Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have moved the 'wp-content' directory to a new folder following the guide at Moving Wp-content. I could able to access plugins directory with out any problem as I used the wp_content_dir in addition with WP_CONTENT_DIR' . But I could not able to access themes and unable to install new themes using theme repository.

define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content' );  
define( 'WP_CONTENT_URL', 'http://example/blog/wp-content');


define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins' );
define( 'WP_PLUGIN_URL', 'http://example/blog/wp-content/plugins');

Edited the wp-config.php with these constraints

Does any one have idea on resolving the issue? I mean, how to access the themes? Also should I expect any trouble in the future for moving the wp-content?

Thank you!

share|improve this question
    
I never get it to successfully install either. So what I usually do is, install wordpress, edit wp-config, and alter wp-content –  Sean Lee Aug 14 '11 at 10:05
    
Can you please elaborate, what do you mean by Alteration of wp-content? I can see that you asked similar question and @rarst answered you with a function -register_theme_directory() . Could you help me more about it if that worked for you? Thanks ! –  user3477 Aug 15 '11 at 13:24
    
Just re-read your question above. Is your intent to move wp-content into a subdirectory, not on the same level as wp-admin and wp-includes? Or all your wp files are situated under blog? –  Sean Lee Aug 15 '11 at 15:39
    
I don't have any objection if it is at same level as wp-admin or elsewhere. So, the folder should be like ...public_html/new-custom-folder/site-content' instead of public_html/wp-content –  user3477 Aug 16 '11 at 15:27
    
If all you need is to move wordpress below public_html, then just do so. Create a subdirectory under public_html, then place all wordpress files inside, and install it from there. What else do you need? –  Sean Lee Aug 16 '11 at 18:09
show 2 more comments

1 Answer

Did you set these constants in wp-config.php? Btw. the plugin constants are optional.

On my development instance, I've set the following before ABSPATH and it works without any problems:

define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content');
define('WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/blog/wp-content');

Limiations:

a) If you use SSL, you should also check for the rigth protocol with is_ssl(). b) Not every plugin in the repository is using these constants. Many plugins out there has hardcoded paths relative to the root directory. So you could run in some problems if you really need a thirtparty plugin.

share|improve this answer
    
Roman, Thanks for your kind response ! I am not using SSL –  user3477 Aug 14 '11 at 9:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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