A blog for technology, SEO tips, website development and open source programming.

How to Stop WordPress Asking for FTP details

0 944

Recently,  I have created a testing environment with Amazon Web Services (AWS) and I have created an instance that it runs a WordPress blog . On that instance I am testing some features related the adoption of Google material design with front end frameworks inside WordPress . For the purpose of testing I have created a custom theme which I wanted to upload and test it, and each time WordPress was asking for FTP details. The post shows how you can solve the problem inside AWS terminal.

Why does WordPress ask for FTP Connection Information?

When automatically upgrading, installing or updating a plugin or the WordPress core from the Admin Dashboard, WordPress needs to make changes to the file system (your web hosted site).

Before making the changes, it first needs to check whether it has the correct permissions to do this.

If it doesn’t, you will be prompted to enter your FTP user account information (see image below) as your FTP user account will have the correct permissions to update the files on your website and WordPress can carry on using the FTP user.

 

Steps 

  • Connect to your EC2 instance via terminal (information doing that can be found here)
  • Copy and paste the following command

 

sudo chown -R apache:apache /var/www/html
  • change the permission
  • sudo chmod -R 777 /var/www/html

Localhost Problem

If you have the same problem on localhost, you need to copy and paste the following code inside wp-config.php

define('FS_METHOD','direct');

 

Leave a Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More