Could anyone help me with this please? I am trying to install my wp theme Recital (it came out quite recently), but when I upload the zip and press install, it says Could not create directory...
What am I supposed to do?
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.Sign up to join this community
If you can log into your host with SSH or FTP, it's an easy fix. Like the comments said before, check your permissions for the Wordpress directory. For example, if you check the hosting directory with
ls -al (typically
/var/www, as on DigitalOcean), they should look something like this:
drwxrwxr-x 6 www-data www-data 4096 Nov 14 17:00 wordpress
That means both the user and group has write permissions set. To make sure those are set correctly, you can use this command on the directory:
sudo chmod ug+w wordpress
Also, make sure the user and group ownership is set correctly. In the above example, the server daemon is run under the
www-data user and group (it could also be
httpd). To set the directory's ownership to
www-data you can run the command
chown like this:
sudo chown -R www-data:www-data wordpress
If you're using an FTP client, try right-clicking the
wordpress directory and using its Permissions functionality to set the permissions and ownership (will vary from FTP app to FTP app).
Hope this helps!
CentOS7 or Ubuntu 16
ftp to install themes and plugins.
ftpd should have been configured to create-directory
and if it is no then should be yes
# Are anonymous users allowed to create new directories? AnonymousCanCreateDirs yes
sudo systemctl restart pure-ftpd
Maybe there is an ownership issue with the parent directories. Find the Web Server user name and group name if it is Apache Web Server
it will print
... ... User: name="apache" id=997 Group: name="apache" id=1000
on Ubuntu it is
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
sudo chown -R apache:apache directory-name
Sometimes it is because of directories permissions. So try
sudo chmod -R 755 directory-name
in some cases
755 does not work. (It should & I do not no why) so try
sudo chmod -R 777 directory-name
Maybe it is because of php safe mode. So turn it off in the root of your domain
safe_mode = Off
For not entering FTP username and password each time installing a theme we can configure WordPress to use it directly by adding
to the wp-config.php file.