how to move wordpress site to new url on the same server.

1. Setup new directory and copy across all  old files.

2. Edit functions.php of old site.

Add these two lines to the file, immediately after the initial “<?php” line.

update_option('siteurl','http://benidrive.com'); 
update_option('home','http://benidrive.com');

reload admin pages a few times. remove the 2 lines

3. Update URL’s in database tables.

On new site, replace all URL’s in database. Use ‘Better Search replace’ plugin on database with old url to new url (serialised that’s why you need this
plugin) on all tables

4. Redirect old site.

Done!

One thought on “how to move wordpress site to new url on the same server.

  1. Hi Wayne, nice blog! Looking for a follow button so I can see all your posts on my WordPress reader on my iPad. Do you have one? Thanks! Also looking for a follow button on your MacintoshHowTo blog but – can’t find one. Thanks. 😀

Leave a Reply to Thomas Cancel reply

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