Manual WordPress installation problems

On my ubuntu droplet, I tried to install WordPress (without using one click because I am thinking of hosting multiple sites and one click seems like can only install one wordpress per droplet).

I follow exactly the same instructions describe on Except that instead of putting wordpress directory in /var/www/html I go for /var/www/ together with /etc/apache2/sites-available/ So that in the future if i want to install more wordpress on the same server, it will be more manageable.

My problem is, i successfully managed to install wordpress but when i try to install plugin, it asks me for my ftp username and password to download and install to wordpress. I am encountering the following problems.

  1. if i upload a plugin directly from my laptop, it says i cannot upload and it says Unable to create directory /var/www/ Is its parent directory writable by the server?

  2. I cannot seem to change the permalinks structure to post_name. I just can’t. I have tried everything like giving 666 permission and let the wordpress create itself and changing AllowOverride None to All (most of the solutions I could find online).

Can someone help me with this ? Thanks.


This comment has been deleted

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@jesin - I have no idea what happened behind the scene when I typed in those commands you provided but IT WORKS ! Thank YOU !

@aronjayvo - Thanks for the multisite tutorial too. I never knew wordpress can be configured that way. I didn’t happen to try your solution because @jesin solution worked like charm. Thank You too !

it’s ownership problem chown -R apache:apache /var/www this command will solve it

Hi @harrylynn17,

SSH to the Droplet as the root user or a user with sudo access and execute the following commands:

sudo chown -R www-data:www-data /var/www
sudo find /var/www -type d -exec chmod 755 {} \;
sudo find /var/www -type f -exec chmod 644 {} \;

Next change the shell of the www-data user:

sudo usermod -s /bin/bash www-data

Set a password for this user:

sudo passwd www-data

Now whenever you wish to upload files use sFTP to login as the www-data user. With this set of permissions you can install plugins/themes directly from the wp-admin area.

First off, you can enable Multisite if you have installed WordPress. So using the one-click install and later enabling Multisite should work.

About your problem, it seems that WordPress thinks that you are working in a local directory or localhost. I have encountered the same problem when working locally, but in your case, I think that there is a misconfiguration in your wp-config file.

Try this code, paste it in your config file:

define('FS_METHOD', 'direct');

If it still fails, you can just simple recreate your droplet and let the one-click install do the work, and then follow the instruction and WPMU Dev on how to enable the Multisite, it’s pretty straightforward and will probably solve all your problems.

Hope this helps,


EDIT: @jesin solution should work too.