Wordpress Plugin - Can't Create Directory

Posted January 3, 2016 16.1k views
CentOSPHPWordPressLAMP Stack

Hi All,

I have successfully installed Wordpress on my LAMP server, however, I can’t seem to update plugins. I am getting the following error:

Could not create directory

Additionally, I have already placed the following instruction in the wp-config file:


Any ideas?

  • I have exactly same problem.
    has been added to wp-config file. I am still unable to install, remove or update plugins and themes. CentOS & LAMP setup step by step from DigitalOcean tutorial.
    Any help will be much appreciated.

  • Am using Centos7 and the folder owner is set to apache:apache
    I’ve done the below too, but i still get the error.

    find /var/www/wp -type d -exec chmod 755 {} \;
    find /var/www/wp -type f -exec chmod 644 {} \;

    and also added this to wp-config.php

    define('FSMETHOD', 'direct');

    but still i am getting an error, “Could not create directory”. I can’t update wordpress and can’t update plugins.
    what am i missing here?

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.

Submit an Answer
2 answers

Most probably permisison issues. Try :
sudo chown -R apache:apache /var/www/html/*

after changing ownership restart the server, i have done the same mistake and it costed me 20 minutes

sudo service apache2 restart