Quantcast
Viewing latest article 5
Browse Latest Browse All 13

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!


Viewing latest article 5
Browse Latest Browse All 13

Trending Articles