• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • About
  • Recommended Books
  • Tools
  • Journal
  • Hire Me
  • Contact
Small Biz Geek

Small Biz Geek

Small Business Design, Marketing & Technology Journal

Website design services

Nerdy analysis of small business design, marketing and technology

  • The Internet
  • Marketing
  • Graphic Design
  • Web Dev
  • Web Design
  • Social Media
  • Technology
  • Miscellaneous

WP Migrate DB: Free WordPress Database URL Replacement Script

You are here: Home / Darren’s Small Business Tools / WP Migrate DB: Free WordPress Database URL Replacement Script

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.

You can save the database file to your computer as a gzip .SQL file and then import it into the destination website via a database management tool like the popular GUI phpMyAdmin or, if you prefer, the SSH tool PuTTY.

phpmyadmin-import-database-success

It’s helpful for developers wanting to clone a WordPress website to a localhost such as WAMP or vice versa. WP Migrate DB has solved a nasty database issue I had concerning serialised data when my normal method of cloning/migrating took a bad turn. 

I’ll come on to my litigant of database complaints in a moment and how I got around them.

Below is the video provided by the makers of the plugin. This is a pretty straight forward scenario: 

Watch video on YouTube

Database Issues & Discovery of WP Migrate DB

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 ben broken for text widgets in the course of me running the SRDB script previously mentioned.

WP Migrate DB would be the answer.

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.

Download the plugin:

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

Primary Sidebar

Search Website

Latest Journal Entries

  • Exposed: The Chinese 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
  • Unable to Meet in Person? Communicate Stress-Free with Online Audio/Video
  • UK Contractors Operating Ltd Companies Should Be Mad as Hell with HMRC and IR35
  • 20 Years On and Website Hit Counters are Still a Waste of Pixels
  • Competitors Can Easily Edit Your Google and Facebook Business Listings
  • Waiting on Final Images for a WordPress Website? Use Temporary Placeholders and Design Around Them
  • GoDaddy Loves Spamming Branded Footer Links to WordPress Installatron Sites

Footer

Primary Navigation

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

Secondary Navigation

The Internet
Marketing
Graphic Design
Website Development
Website Design
Social Media
Technology
Miscellaneous

Derby & Nottingham Area

Small Biz Geek
Office 897
37 Westminster Buildings
Theatre Square
Nottingham
NG1 6LG

Telephone

Tel: +44 (0) 115 714 3290
Tel: +44 (0) 7951 897 243

VoIP

Skype: ilkestonwebdesign
WhatsApp: 07519 897 243

Email

[email protected]

Let’s Connect

Twitter
YouTube
LinkedIn
RSS

Subscribe to Blog by Email

Subscribe to Blog By Email
Genesis Framework by StudioPress


Copyright © 2022 · Small Biz Geek · Privacy Policy · Commenting Policy · Website Disclaimer · ICO number: ZA305900


Written and designed by Ilkeston Web Design