The following are the things that you need to take note of very carefully when you deploy your Wordpress website to a web hosting server or if you plan to deploy your Wordpress website which was previously setup in the web hosting server to your XAMPP local host.
Tip#1: The wp-config.php entries should be correct if you deploy your Wordpress website to remote hosting. Of course, it will use the web hosting database NOT your XAMPP database anymore. Basically you just need to export your local Wordpress database to your hosting database server and then update the wp-config.php entries as shown previously.
Tip#2: Same thing with deploying Wordpress to your XAMPP localhost. You need to import your Wordpress database to XAMPP phpMyAdmin and then update the wp-config.php.
Tip#3: Whenever you deploy or migrate Wordpress from one location to another (XAMPP localhost to web hosting server or vice versa). You need to update important entries in the wp_options table in the Wordpress database. These are the option_names:
Example: supposing you need to deploy the Wordpress website developed in XAMPP localhost (http://locahost/wordpressdemo) to a remote hosting server in your domain: http://www.example.com/. The following are the steps to update siteurl and home:
Login to http://localhost/phpmyadmin.
Go to your Wordpress database and click wp_options table.
Change the following:
siteurl option name:
b.) home option_name
If you are doing the opposite (migrating from remote server to localhost), the same method applies.
Tip#4: If possible always use relative URL structure (http://www.webdevelopersnotes.com/design/relative_and_absolute_urls.php3 ) so that you can easily migrate your Wordpress website from XAMPP localhost to hosting server or vice versa.