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.

if you want site avialble on multiple URL

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

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *