wp theme.. Could not create directory

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?

Related posts

3 comments

  1. 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!

  2. CentOS7 or Ubuntu 16


    1.

    WordPress uses ftp to install themes and plugins.
    So the ftpd should have been configured to create-directory

    vim /etc/pure-ftpd.confg
    

    and if it is no then should be yes

    # Are anonymous users allowed to create new directories?
    AnonymousCanCreateDirs       yes
    

    lastly

    sudo systemctl restart pure-ftpd
    

    2.

    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

    apachectl -S
    

    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

    then

    sudo chown -R apache:apache directory-name
    

    3.

    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
    

    4.

    Maybe it is because of php safe mode.
    So turn it off in the root of your domain

    vim php.ini
    

    then add

    safe_mode = Off
    

    NOTE:
    For not entering FTP username and password each time installing a theme we can configure WordPress to use it directly by adding

    define('FS_METHOD','direct');
    

    to the wp-config.php file.

  3. If it’s for MAC & localhost, the solution is easy. Go to your WordPress directory & change the permissions.

    HOW?
    Clicking right button, more information (command+i), Sharing & Permissions.

    Activate all for reading & writing for all users (including everyone) in all the folders mentioned above.

    the wp-config.php script,
    the wp-content folder, the wp-content/plugins folder, the wp-conent/themes folder,
    the wp-includes folder.

    Finally, in the wp-admin folder activate the permits for reading & writing for the admin and yourself (do not activate permit for everyone here!)

    Tutorial (in spanish) here:
    https://www.youtube.com/watch?v=wJXljTtqI3A

    (For those not speaking Spanish, it can also be helpful, its very visual)

    Hope this is useful
    xx

Comments are closed.