Allow FTP access to developers for wordpress sites

Date posted : 07/02/2019

In this blog article, we will be explaining FTP related access to wordpress sites. Generally developers used to face issues with FTP uploads or wordpress plugins installs via wp-admin.

It happens due to incorrect user/group file permissions given to wordpress files.

To accomplish this, we need to do the following:-

1. Create a new user and strong password

$ useradd devs

$ sudo passwd devs
enter password for user devs
New password:

2. Modify user folder to point to wordpress document root

$ usermod -d /var/www/pheonixsolutions.com devs

3. Add user to the apache group

First you should check the username of your webserver application. Mostly it will be apache or www-data

$ usermod -g apache devs

4. Change ownership

$ cd /var/www/pheonixsolutions.com
$ chow devs:apache /var/www/pheonixsolutions.com -R

5. Make files writable by user/group

$ find . -type f -exec chmod 664 {} \;
$ find . -type d -exec chmod 775 {} \;

You should be able to upload files without issues. Also you can install/delete/update new plugins via wp-admin flawlessly.

Thanks for using pheonix solutions.

You find this tutorial helpful? Share with your friends to keep it alive. Be the first to comment, we value your suggestions.

For further queries please comment below.

Leave a Reply