Sabtu, 18 Februari 2017

How To Move Wp-Content Folder To Any Sub-Domain?

Speed is one of the major factors in which every blogger and webmaster should take care about. Also if you are WordPress user than you may use so many plugins to speed up your blog, but here we’ll try a different way to slightly increase speed of our WordPress blog. Many of popular sites are also doing this, the reason for it is simple, it increase speed of your site. So in this article, I’ll tell you how to move wp-content folder to sub-domain easily.

How it works?

When you move your blog’s wp-content folder to any subdomain, such as cdn.trickytechs.com and also add CDN in it, than it will increase speed of your blog, as it will differently work with your site with CDN than when any one open your site than there browser download all JavaScript, CSS, Images etc. through another domain and due it your visitors’ browser will download all data parallel, same as how download managers speed up your downloading speed. And as many browsers now support at least 4 parallel downloads, so it will surely increase your download speed.

Before we start the tutorial, be sure that many plugins may stop working or not work correctly after using this, and you have to contact the author of the plugin to help or have to solve the problem yourself. The plugin which not work correctly in my case is only W3 Total Cache, and that be a reason to remove it from my blog.

How to move wp-content folder to sub-domain?

  •     To move your wp-content folder to a sub-domain, you first have to create a new sub-domain, and remember what you have setup its directory name, as it will be needed in this tutorial.
  •     After it, you have to copy files inside wp-content folder to the folder of your sub-domain.
  •     Now, open wp-config.php from your blog’s root directly.
  •     After it put the below code in it, remember to replace it with your own data:


    define( ‘WP_CONTENT_DIR’, ‘/home/USERNAME/public_html/DIRECTORY_SUBDOMAIN‘ );

    define( ‘WP_CONTENT_URL’, ‘http://sub-domain.domain.com‘ );

    define( ‘BWPS_FILECHECK’, true );

  • Data to be replace:


USERNAME = Your cPanel or Control Panel username from which you access it.

DIRECTORY_SUBDOMAIN = The folder of the subdomain.

http://sub-domain.domain.com = Replace it with your sub-domain address.


  •     Now simply save. Done!

Tidak ada komentar:

Posting Komentar