Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com
huuphan.com. Powered by Blogger.

My blog about Open Source: Zimbra Mail Server,linux,bash script,centos,linux command...

Fixed Wordpress plugin install Could not create directory

 In this tutorial, How to Fixed wordpress plugin install could not create directory. I'm using Nginx, PHP 7.4 and WordPress on Ubuntu 21.04. 


After install and configure wordpress completed. I have update plugin and could not create directory. I installed into a wordpress directory in /var/www . Nginx does not have permissions to write to the wp-content directory.

Wordpress plugin SEO Error

Installing Plugin: SEO 17.0 Downloading install package from https://downloads.wordpress.org/plugin/seo.17.0.zip…

Unpacking the package…

Could not create directory.

How to do it Fixed

Step 1: Getting the connection information

Create new file whoami.php into /var/www/huuphan.com/ directory. For example, the content as below

[email protected]:~# cat /var/www/huuphan.com/whoami.php
<?php echo(exec("whoami")); ?>
[email protected]:~#
Curl url or type domain in browser as below 

[email protected]:~# curl https://huuphan.com/whoami.php
huupv

[email protected]:~#

Step 2: Change owner of the wordpress directory to user in shown with whoami.php. Example my user is huupv

sudo chown -R huupv:www-data /var/www/huuphan.com
Note: Ubuntu use www-data user of Nginx server.

Step 3: Change permisstion for wordpress directory

sudo find /var/www/huuphan.com -type d -exec chmod 0755 {} \;
sudo find /var/www/huuphan.com -type f -exec chmod 0644 {} \;



post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com

This Blog is protected by DMCA.com