HomeApache Page 3 - Working with XAMPP and Wordpress
Wordpress Deployment and Migration Tips - Apache
In this tutorial, you will learn how to work with Wordpress in a XAMPP (X, Apache, MySQL, PHP, and PERL) environment, including deployment and migration tips and techniques.
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:
siteurl
home
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:
siteurl: http://localhost/wordpressdemo
TO:
siteurl: http://www.example.com
b.) home option_name
home: http://localhost/wordpressdemo
TO:
home: http://www.example.com
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.