WordPress is an awesome blogging portal. As your WordPress site grows the content like themes, uploads and plugins also grow. At some point of time the the size of wp-content directory grows to an unmanageable level. Now taking backups of your WordPress installation or moving the WordPress installation to some other server becomes clumsy. To avoid such situations WordPress has come up with an excellent solution. Since Version 2.6, you can move the wp-content directory, which holds your themes, plugins, and uploads, outside of the WordPress application directory.
We recommend that the wp-content directory should be moved to a new domain or sub-domain.
Benefits of moving wp-content to other (sub)domain.
1. Easy and hassle free data transfer
To do this simply follow the below steps:
Here we assume that our directory structure is something like:
1. Create a new directory (lets say ‘files’) like /home/public_html/wordpress/files/. You can chose any other location.
2. Create a new subdomain (lets say files.example.com) in you hosting account and point it to the newly created ‘files’ directory.
3. Now copy the /home/public_html/wordpress/wp-content/ drectory to /home/public_html/wordpress/files/wp-content/
4. Open your wp-config.php and add following lines to it:
define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/files/wp-content' ); define( 'WP_CONTENT_URL', 'http://files.example.com/wp-content' );
And you are done. Now refresh your website and you shall see all the content being loaded from the new (sub)domain.