Is it possible to rename the wp-content folder dynamically? I am building a custom framework to use on themes and it would be nice to set it up where it does everything on its own.

I am using this following code right now in wp-config

define ('WP_CONTENT_DIR','/name_of_new_folder');
define('WP_CONTENT_URL','http://example.com/name_of_new_folder');

Can I pull the site domain through dynamically with PHP?

2 Answers
2

Don’t do what seems to be possible…

You can use the possibility to change the WordPress constants WP_CONTENT_DIR and WP_CONTENT_URL in your wp-config.php.

BUT it really, really, really, really is not recommended.

Why? not recommended??

It’s pretty easy: Just do a cross file search (with your IDE or for e.g. Notepad++) for wp-content and you’ll find it hardcoded it many places. Some of the stuff will still work, but some wont. Yeah, I’ve already tried that.

Leave a Reply

Your email address will not be published. Required fields are marked *