0

I am using wordpress as a submodule and capristrano to deploy.

The deployment seems to work correctly and i am able to log in to wp-admin, but when i look at my themes

ERROR: The theme directory "sage-master" does not exist.

The submodule setup adds the wp-content files to site_url.com/content ie site_url.com/content/themes site_url.com/content/plugins etc

Within my wp-config I have

define('WP_CONTENT_URL', 'http://site_url.com/content');
define('WP_CONTENT_DIR', realpath($_SERVER['DOCUMENT_ROOT'] . '/content'));

This has always worked before, I feel as though Im just making a silly mistake somewhere.

Ive checked the DB and the site_url and home are set correctly.

Any ideas on what I may have missed?

Thanks Nad

2 Answers 2

1

I'm giving possible cases from the top of my head:

Case 1: May be it's related to realpath() function. realpath() acts differently in different OS. Also, it returns false if the web server user doesn't have executable permission on the corresponding directory. There are some other problems too, so better try this:

// change it based on the location of wp-config.php file
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/content' );

Case 2: May be the sage-master theme directory actually doesn't exist or it's not accessible by the web server user.

Case 3: May be the directories exist but have character case different. Unix systems have case sensitive file system, but windows is case insensitive. So it may work on windows but not on Unix for this reason.

There may be other issues, so better activate debugging in WordPress and check what errors you get.

0

Look for a folder called 'sage-master' in the themes folder of wp-content. If not found, a similarly-named folder might contain it. Rename the folder to 'sage-master'.

Another way would be to just reinstall the theme. That should put it in the proper place for WP to find.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.