Starting today, we’re going to publish tips and tricks related to WordPress. Hope you guys like it.
Your demo site is located in http://currentclientdomain.tld/demosite and you want to move your site to http://currentclientdomain.tld.
As you may all know, you can move the site by moving all the files under http://currentclientdomain.tld/demosite to http://currentclientdomain.tld. But do you know that there’s another simpler way to do it?
All you have to do is:
- Copy index.php and .htaccess from demo site root into production site rootdirectory.
- Open index.php from demo site root directory, find this code:
[php]require(‘./wp-blog-header.php’);[/php]and replace it with[php]require(‘./demosite/wp-blog-header.php’);[/php]
- Open WordPress admin panel and go to Setting -> General, edit Site Address (URL) from http://currentclientdomain.tld/demosite into http://currentclientdomain.tld
If you do the above steps above correctly the demo site will now run as the new live site and can be access from http://currentclientdomain.tld.
One thing you should note is that new live site WordPress Dashboard can only be access from http://clientsitedomain.tld/demosite/wp-admin/.
This tutorial was intended to show you that there’s another way to move your demo site and you must realized that this tutorial made a minor modification to WordPress code file.