Tags

,

If you are doing search and replace every time after moving your code-base and database from one server to other server then no need to do this. There is a easiest way, to access the same code and database with different URL, as follows

Open your site’s wp-config.php and write below code in it

define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);

Before below code

if ( !defined('ABSPATH') ) 

Wordpress-MySql
In this way you no need to do anymore search & replace.
Other benefits:
– No need to have more than one database. You can have code base any where like on server or on local, just need connect with the database and it will work.
– Several people can work on same data-bse while their  code-base is physically in different place.

For more information follow the below links:
http://codex.wordpress.org/Changing_The_Site_URL
http://codex.wordpress.org/Moving_WordPress

Advertisements