nwlinux
Custom Search

Change WordPress wp-content Directory Location

Published September 18th, 2011 | categories include: CMS, Informational, Server, server-side, Wordpress | Share on Twitter
article shortlink: http://nwlinux.co/wO

Changing your default WordPress wp-content, themes and plugins directory has several main advantages.

According the the WordPress page here, you will begin by editing your wp-config.php and entering the location of your wp-content folder.

define( ‘WP_CONTENT_URL’, ‘http://sub.sitename’);
define( ‘WP_CONTENT_DIR’, ‘/server/path’);

In the example above, the wp-content folder, which includes index.php, themes and plugins will be located at http://sub.sitename/themes and so on. It is important that both declarations be placed in the wp-config.php. Otherwise, I found out that only using the WP_CONTENT_URL breaks the whole intent of changing the path to begin with. You can find a host of WordPress config.php declarations here.

Next, go ahead and delete the wp-content folder if you have not already moved it to the new home.

As mentioned above, changing the wp-content directory location has a few main benefits for me. However, these improvements do nothing if you haven’t set the folder and file permissions appropriately. Please make sure that you assign the appropriate group, owner and read, write and execute (e.g. chmod) permissions or none of the work that you just completed means a damn.

Previous Post: «
Next Post: »
Do you have something to say? Send me a message on my Google Plus profile.

Recent Posts

Fix Get Simple CMS URL’s when migrating to a new domain
categories include: Concrete5, GetSimple

How many robots does it take to change a light bulb?
categories include: Uncategorized

DuckDuckGo Adam Yauch Tribute duck
categories include: Images

Stuff

About >> I'm a Network Administrator out of Olympia, WA.

Social >> You can find me on Twitter @nwlinux, Google Plus or LinkedIn. Also, take a look at FAQ.me for more info.

RSS Feed >> A couple of options here: You can click the RSS icon at the top of the page or hit up FeedBurner.