Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Why

As you probably know, migrating a WordPress database from one domain to another can be a bit of a hassle. Two major things must happen for it to be a seamless migration; Find & replace the domain and fix the serialized url's containing the old domain. This tool does that for you. No need to run a bash script on every migration. Simply drag the sql dump into the square and set a new domain.

Use

Frontend

For front-end use see ui.js in the assets directory. It's probably easier just to use the online verson: http://psaia.github.io/Peach/

Backend

Peach can be useful for continuous integration when working with Wordpress sites.

var dbdump = fs.readFileSync("./old-database.sql");
var Peach = require("peach");

var oldDomain = Peach.wp_domain(dbdump); // Helper to get current domain name.
var migration = Peach.migrate(dbdump, oldDomain, "http://your-new-domain.com");

migration.processed_file(); // The new sql file.

// Extra public properties.
migration.old_domain;
migration.new_domain;
migration.serialized_count; // Number of serializations.
migration.replaced_count; // Number of replacements.
migration.char_diff; // Difference in characters. e.g. -4 || 2 || -4

Test

Tests are wrtten in mocha.

npm install
npm test

About

A cute javascript/html5 app to safely migrate a database with serialized PHP objects.

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.