• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Good Books
  • Tools
  • Blog
  • Darren
  • Contact
  • Hire Me
Small Biz Geek

Small Biz Geek

Small Business Design, Marketing & Technology Journal

Solving small business design, marketing & tech problems

  • The Internet
  • Marketing
  • Graphic Design
  • Web Dev
  • Web Design
  • Social Media
  • Privacy & Security
  • Tech
  • Misc

WP Migrate DB: Free WordPress Database URL Replacement Script 🔄

You are here: Home / Darren’s Small Business Tools / WP Migrate DB

WP Migrate DB is a free WordPress script that runs in the dashboard as a plugin and creates a database dump while changing all the URLs and handling serialised data strings.

WP Migrate DB

This plugin helps developers wanting to clone a WordPress website to a localhost such as WAMP or vice versa. Punch in your new destination URL and export the file.

You can save the exported WordPress database file to your computer as a gzip .SQL file and then import it into the destination website via a database management tool like phpMyAdmin or, if you prefer, the SSH tool PuTTY, which in my opinion generates the best, cleanest database exports.

phpmyadmin-import-database-success

Why Use the WP Migrate DB Plugin?

Usually, I build new client websites locally using WAMP, clone the database, replace the URLs, copy the website folder directory and install everything to the destination server.

This is what I call the manual method of exporting the .SQL from phpMyAdmin.

On this occasion, I had built the WordPress site WAMP (as per usual) but wanted to clone everything into an InstantWP installation for my client.

I followed common procedure and tried to replace the database URLs, as per usual, using the free script Search Replace DB without breaking serialised data.

Search and replace database URLs

All that needed to be done was to change the URLs from http://localhost/websitetest to http://127.0.0.1:4001/wordpress

WordPress Text Widgets Wiped Out

For some reason, on this occasion, the Search Replace DB script went wrong. The WordPress text widgets were wiped out on the destination server.

Everything else was there except text widgets in the header, sidebar, footer.

It wasn’t as though they’d been relegated to the “inactive widgets” area either, as is often the case when switching WordPress themes. The widgets simply weren’t there.

The data pertaining to them WAS still in the .SQL file which meant serialised data had been broken for text widgets in the course of me running the SRDB script.

I needed a solution. WP Migrate DB was the answer. In fact, I use WP Migrate DB 99% of the time now.

Old URL > New URL

WP Migrate DB will find and replace all URLs in your database as well as unserialising and reserialising. This is taken care of before the database dump actually takes place. 

Any serialised data pertaining to text widgets is handled as a result. 

Wp Migrate DB

If you’re migrating a https website to your localhost, be sure to enter http: in the replace field.

If you don’t you’ll end up with a database full of URLs that look like https://localhost/yoursite and your site will not load in the localhost.

It seems WP Migrate DB is a fantastic choice and allows me to clone any WordPress website database on either a localhost or remote server and reproduce wherever I want.

But as you know, it depends on your “rig” – there are seemingly infinite combinations of software with WordPress and situations can differ hugely.

Summary: Amazing Lightweight Plugin for Moving a WP Database

This plugin is usually good enough, although recently I did have issues importing an exported database into phpMyAdmin on a Dreamhost shared host – errors were occurring so I had to use a different method. I don’t have the problem with other hosts. Must be a MySQL or phpMyAdmin version issue.

I’ve never used the paid version of this plugin – just the free one. If I was ever working on a site that required extra plugin features for moving the database, I’d be happy to pay for it.

https://wordpress.org/plugins/wp-migrate-db/

Primary Sidebar

Search Website

Latest Blogs

  • Is Generative Engine Optimisation (GEO) the Answer to the Future of Search? 🎨
  • How Hiding Your Phone Number and Using a Booking System Repels Time Wasters and Helps “Positioning” 🗓️
  • “Fucking Good Content” – Dan Kelsall (Book Review) 📘
  • Scam Poetry: The Time I Was Recruited to the Cult of Amway ⚠️
  • A Story of Seductive Social Media Success and Neglected Email Strategy 🏚️
  • The Classic Social Media Trend Destined to Ruin Your Business 😭
  • Looking for Online Work? Don’t Fall for this Fake Hays Recruitment WhatsApp Scam ⚠️
  • Cream of the Crap: How Fake Reviews, Bad Businesses and Dangerous Products Rise to the Top 💣
  • Exposed: The Hong Kong Investment “Fraud Recovery” Scammer Deceiving Victims 🤑
  • Computer Says No: Does Your Website Work for People with Disabilities? ♿
  • Chinese Tinder Profiles Are Using Photos of Pretty Girls to Scam “Investors” 💋
  • Small Biz Owners “Trapped” Using Email Addresses Belonging to Internet Service Providers 🪤
  • In the Pandemic, QR Codes are Finally Proving Worthy in the West 😷
  • Small Businesses Finally Start Marketing… and All It Took Was a Global Pandemic 🏁

Footer

Primary Navigation

Home
About Darren
Good Books
My Tools
Blog Posts
Hire Me
Contact Me

Derby & Nottingham Area

The Internet
Marketing
Graphic Design
Website Development
Website Design
Social Media
Technology
Miscellaneous
Privacy & Security

Let’s Connect

Twitter
YouTube
LinkedIn
RSS

Small Business Blog · Privacy Policy · Commenting Policy · Website Disclaimer · ICO number: ZA305900


Written and designed by Ilkeston Web Design

  • Home
  • Good Books
  • Tools
  • Blog
  • Darren
  • Contact
  • Hire Me