• I can access my server with FTP client. I can see all the WordPress files and catalogs.

    But when I try to install a WP theme, I get this message form WP:
    ‘Unable to locate WordPress content directory (wp-content).’

    The permissions to read wp-content and a parent directory are granted, so I have no idea what is wrong.
    Can you help?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The permissions to read wp-content

    The webserver needs write access

    Thread Starter poppers44

    (@poppers44)

    this is a parent directory:
    drwxr-xr-x 5 root root 4096 Feb 13 13:06 html/

    and this this wp directory:
    drwxr-xr-x 5 root root 4096 Feb 13 13:06 ./
    drwxr-xr-x 3 root root 4096 Feb 8 23:06 ../
    -rw-r–r– 1 nobody nogroup 405 Feb 6 2020 index.php
    -rw-r–r– 1 nobody nogroup 19915 Feb 12 2020 license.txt
    -rw-r–r– 1 nobody nogroup 7278 Jun 26 2020 readme.html
    -rw-r–r– 1 nobody nogroup 7101 Jul 28 2020 wp-activate.php
    drwxr-xr-x 9 nobody nogroup 4096 Feb 3 21:11 wp-admin/
    -rw-r–r– 1 nobody nogroup 351 Feb 6 2020 wp-blog-header.php
    -rw-r–r– 1 nobody nogroup 2328 Oct 8 21:15 wp-comments-post.php
    -rw-r–r– 1 nobody nogroup 3218 Feb 13 13:06 wp-config.php
    drwxrwxrwx 5 nobody nogroup 4096 Feb 13 16:15 wp-content/
    -rw-r–r– 1 nobody nogroup 3939 Jul 30 2020 wp-cron.php
    drwxr-xr-x 25 nobody nogroup 12288 Feb 3 21:11 wp-includes/
    -rw-r–r– 1 nobody nogroup 2496 Feb 6 2020 wp-links-opml.php
    -rw-r–r– 1 nobody nogroup 3300 Feb 6 2020 wp-load.php
    -rw-r–r– 1 nobody nogroup 49831 Nov 9 10:53 wp-login.php
    -rw-r–r– 1 nobody nogroup 8509 Apr 14 2020 wp-mail.php
    -rw-r–r– 1 nobody nogroup 20975 Nov 12 14:43 wp-settings.php
    -rw-r–r– 1 nobody nogroup 31337 Sep 30 21:54 wp-signup.php
    -rw-r–r– 1 nobody nogroup 4747 Oct 8 21:15 wp-trackback.php
    -rw-r–r– 1 nobody nogroup 3236 Jun 8 2020 xmlrpc.php

    although wp-content has all the permissions I still get this message:
    ‘Unable to locate WordPress content directory (wp-content).’

    check your wp-config.php hasn’t specified a different location e.g.

    define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' );
    define( 'WP_CONTENT_URL', 'https://example/blog/wp-content');
    define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' );
    define( 'WP_PLUGIN_URL', 'https://example/blog/wp-content/plugins');
    Thread Starter poppers44

    (@poppers44)

    none of those lines are in my wp-config.php

    Ubuntu Apache server need them set to www-data:www-data.
    CentOS / Redhat server I believe is apache:apache

    Nobody:Nogroup is default. You use chown -R xxxx:xxxx /var/www/<your site>. They are set from the ssh session to your server.

    Thread Starter poppers44

    (@poppers44)

    Thank you! That solved the problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unable to locate WordPress content directory (wp-content).’ is closed to new replies.