How to Migrate a WordPress site manually for free using UpdraftPlus

updraftplus Wordpress

I LOVE the UpdraftPlus plugin. LOVE. IT. And someday when I have the money I may decide I need to upgrade to a paid version. But for now, I don’t need all the bells and whistles, and I finally figured out how to migrate without paying for their paid migrator plugin.

I’m posting this here because I couldn’t find this info ANYWHERE on the web when I went searching for info on how to do this. I had to figure it out on my own. I wanted to put it out there for others that might be searching for this info too. And also for me to be able to reference again the next time I need it. (I tend to forget things, lol!)

I’m no tech guru, but I knew there had to be a way to do this without paying $30 for Updraft’s migrator plugin. I’m sure it’s money well spent, especially if you are going to be doing a fair amount of migrating. And perhaps if your migrations are more complicated than mine were…

But today I was simply reinstalling my son’s old homeschool blog. Something which only he and I will ever see (it’s for him to write up the work he does, for me to look over. He prefers typing over writing in a notebook). And it was getting a new address, so it wasn’t a simple restore. And I didn’t have $30 to spend. And I really didn’t feel that it warranted spending any money on a simple child’s blog which might only be used sporadically.

I tried restoring the backup of his old site which I had saved with UpdraftPlus when I moved to a new web host and hadn’t yet reinstalled. The restore failed, of course, because it’s not just a restore, it’s a MIGRATION (moving to a new address). So I started digging around and researching.

This is what I found out. Maybe, it will help you too!


I was able to do the migration myself in no time flat (after a fresh install of WordPress in the new location), with these 2 simple steps:

#1: Add this code to the wp-config.php file:

define('WP_SITEURL', 'http://example.com'); 
define('WP_HOME', WP_SITEURL);

You will need to replace ‘http://example.com’ with your new URL.

Put this code somewhere near another line that starts with “define”. I stuck mine just above the line where you enter the name of your database.

This will enable you to log into your freshly migrated install using you old admin username and password from the backup. (Since it will now be restored.) And then…

#2: Use the “Better Search Replace” WP plugin by Delicious Brains to replace all instances of the old URL with the new one.

If at some point in the future this plugin ceases to exist, I imagine there are probably lots of others that exist out there.

I highlighted every table and just had it do the replace everywhere.

VOILA!! It worked!!

It was really that simple.


I get that UpdraftPlus needs to make money…they are, after all, a business. And I would encourage anyone that has many sites to migrate to just go for it and buy the migrator plugin because I imagine it’s fantastic. Their backup plugin sure is!

But if you’re like me and just can’t warrant the money spent for something so simple…or are just really broke (story of my life)…here’s a way to do it manually! Hope it works for you too! I don’t know if this might not work for more complicated sites. But it worked for me!

Related Posts

13 Comments

  1. This is so awesome. I was pulling a website to a local site on my computer via UpdraftPlus, and hit the database error which crashed my local site. This definitely fixed it!

    Thank you so much for the post!

    I did have a minor hiccup with copying the code.
    Anyone new to this part:
    define(‘WP_SITEURL’, ‘http://example.com’);
    define(‘WP_HOME’, WP_SITEURL);

    If you’re new to code, just remember that copying/pasting code from the internet tends to break. For some reason, html turns single quotation marks into apostrophes, which WILL BREAK THE CODE.

    So, you do have to manually fix it when it does happen.
    https://i.imgur.com/praJwXb.png

    It also helps to use a code editor that highlights proper code. For more information, use Notepad++ and follow this. https://stackoverflow.com/a/14314118/4096078

  2. I’m glad I was able to help! And thanks for the info on the copy/paste issue…I didn’t even think about that! (Not a coder here) I think I may have fixed the issue…hopefully. I didn’t even think about how I should be displaying that code differently! Thanks for the heads up!

  3. Thanks for this insightful tutorial. May I further clarify the steps.

    #4 – Install UpdraftPlus plugin on the old and new site.
    #1 – Backup your old site using UpdraftPlus plugin.
    #2 – Transfer your backup files from old site to new site (usually by FTP by placing the files under /wp-content/updraft)
    #3 – At the new site, add the following lines in the wp-config.php file, Replace http://newsite.com with your new site’s URL

    define(‘WP_SITEURL’, ‘http://newsite.com’);
    define(‘WP_HOME’, WP_SITEURL);

    #5 – Restore the backup files using UpdraftPlus plugin in new site. During restoration, there’s a warning saying you are migrating a site and should use the migrator add-on but do ignore this 😉
    #6 – After restoration is complete, install Better Search Replace plugin by Delicious Brains on the new site.
    #7 – Run the Better Search Replace (under Tools menu) to replace any instances of old site URL with the new site URL.

  4. I feel like I need to tip you !!!!
    Thanks so much !
    Just done it in 5 mn…
    Now time will tell if it goes all smooth with my website updates and name changing…
    Thanks again !

  5. Pingback: Cannot complete migration on LAMP – WordPress Solutions Group

Leave a Reply

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