Change WordPress URL

Method 1: Editing MySQL backup

To change WordPress site url, backup your MySQL database.

Run sed command to replace the URL in MySQL backup file.

Restore the new db-modified.sql, that will have the database with URL changed.

Method 2: Using Plugin

Edit your wp-config.php and add following line.

You can also edit the wp_options table

Now you need to use some wordpress plugin to change URL in database, here are some useful plugins for changing site url.

See WordPress