AWS, WordPress

How to skip the FTP credentials to install the theme and plugin on AWS EC2

WP AWS EC2

For installation of the theme and plugins on AWS EC2, we can skip the FTP credentials. I came to know this recently.

I recently installed a WordPress site on AWS EC2 and found I can not install any theme or plugin. Each time I tried to install a plugin or theme, WordPress showed me a pop form on which it required an FTP credential.

I have researched on the web how to create an FTP client for EC2. So I followed a tutorial and created an FTP client AWS EC2. But it didn’t work.
According to the tutorial, I had install vsftp and configured the /ec/vsftpd/vsftpd.conf

The tutorial instructed to change a line on vsftpd.conf file

anonymous_enable=YES 

To

anonymous_enable=NO

And Add the following lines of code :

pasv_enable=YES
pasv_min_port=1024
pasv_max_port=1048
pasv_address=[YOURPUBLICIP]

Unfortunately, all of my efforts failed. I couldn’t able to solve the FTP credentials problem.

How I avoid/skip creating the FTP credentials

Fortunately, I found a solution in stackoverflow, and the person had the same problem as mine.

The answer is mindblowing; add one line of code on the wp-config.php file.

Here is the solution for skipping the FTP credential on AWS EC2. Add the following line on your wp-config.php located in the WordPress root directory.

define('FS_METHOD', 'direct');

Also, you may need to assign write permission to the WordPress directory. To do that, we need to enter the below command into the terminal to set the write permission.

sudo chown -R apache:apache /var/www/html

Assume the WordPress folder is on html directory.

I hope this instruction helps you skip the FTP credential on AWS EC2.

Related Posts

Creating a Tabbed Settings Page in a WordPress Plugin Using WPPB 10 Essential WordPress Plugins for WordPressers: A Guide to Optimizing Your Website Installing a WordPress Plugin: A Step-by-Step Guide for Newbies Become an AWS Certified SysOps Administrator: A Comprehensive Guide How to Create a Custom Contact Form in WordPress 2022 – A Year of Growth and Learning: My Journey to Success in the Tech Industry How to create files automatically with the bash script? What is the best way to delete all products in WooCommerce? How to fix WordPress There has been a critical error on this website The Best Places to Get Royalty-Free Images for Your WordPress Blog Articles  How To Prevent WordPress Blog Content Scraping For Beginners  How To Plan Your WordPress Posts  How To Place Captions On Images In WordPress  WordPress Blog Email Newsletters: What, Why, and How  Are you new to WordPress and curious about managed WordPress hosting?  What You Can Do To Participate In The WordPress Project  What Is A Web Blog, And How Does It Differ From A Website?  What Effect Do Your Web Host’s PHP Updates Have on WordPress Sites?  What Are The Restrictions Of The WordPress. Com Platform?  The Best Places to Get Royalty-Free Images for Your WordPress Blog Articles  Step-by-Step Guide for Installing and Configuring WP Super Cache for New Users  Do you want your WordPress content to have images next to each other?  How to Select the Ideal Color Scheme for Your WordPress Website  How To Pick The Perfect Domain Name  How to Repair the WordPress Error Establishing a Database Connection  How To Fix Typical Image Problems In WordPress  How to Enlarge Images Without Compromising Quality  How to Download and Install Plugins and Themes for WordPress from GitHub  How to Delete Numbers from URLs Created with WordPress  The Step-By-Step Guide To Uploading PDF Files To Your WordPress Website Want to know how to remove digits from WordPress blog posts and URLs?  The Step-by-Step Guide to Linking to an Email Address in WordPress How Does Changing Your WordPress Theme Affect Things?  Getting Started With WordPress Comment Moderation: A Beginner’s Guide  How to Generate Branded Short URLs for Your WordPress Blog: A Step-by-Step Guide WordPress Categories Vs. Tags: How To Sort Your Content For SEO Step-by-Step Guide for New WordPress Users on How to Correctly Uninstall Plugins in WordPress WordPress Theme Framework: What Is It? All That Is Good, All That Is Bad  Images Theft: 4 Approaches to Protect Them in WordPress 7 Crucial Tips for Using WordPress Shortcodes How to Use File Transfer Protocol (FTP) to Upload Files to WordPress for Newbies 5 Easy Ways to Use WordPress to Get More Facebook Likes  How To Setup A WordPress Theme For Beginners How To Get Free WordPress Training In A Week How To Detect and Stop a DDoS Attack Against WordPress How To Install A WordPress Plugin: A Step-By-Step Guide For Newbies How to Delete All of Your Past DNS Records (Chrome, Mac, Windows) How to Create a Site-Specific WordPress Plugin How to Copyright And Trademark Your Blog Name and Logo How To Conduct An Appropriate Website Speed Test (8 Best Tools) To-Do List: 7 Items Before Going Public Your WordPress Site Fixing A Hacked WordPress Website: A Guide For Complete Beginners Tips For Deleting And Removing A WordPress Theme (Step By Step) How to Merge Two WordPress Websites Without Sacrificing Search Engine Optimization Comparing WordPress.Com With WordPress.Org: Which One Is Better? WordPress and GDPR Compliance: The Complete Guide – Everything You Need to Know Which One Is Better: A WordPress Plugin Or A Functions.php File? The Top 10 WordPress Bugs And How To Fix Them How To Making A Website Logo: Step-By-Step Instructions  11 Essential Pages Every WordPress Site Must Have In 2022 WordPress’s 15 Most Frustrating Issues and How to Fix Them WordPress vs. HTML Site- Which Website Design Is Best for Your Business? WordPress Users: 10 Email Marketing Mistakes to Avoid 5 Essential WordPress SEO Audit Checklist Items To Improve Your Rankings 2 Ways to Stop Users from Deactivating WordPress Plugins How to delete all the WooCommerce products with SQL Query? Pagination in WooCommerce: how to set it up? How to Add WooCommerce Product Categories to the Menu What’s the difference between WordPress.com and WordPress.org? How to apply WooCommerce Shortcodes to theme development AWS Service: Lambda How AWS RDS Works