Skip to content

quevenrib/wordpress-migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

SQL commands for database migration

Repository with basic commands for WordPress migration. Fell free to improve.

To use it you must replace the table prefix and your old and new URLs.

Here is the file with the commands below

Change "siteurl" or "homeurl"

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl.com', 'http://www.newurl.com')
WHERE option_name = 'home' OR option_name = 'siteurl';

Change GUID

UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.oldurl.com', 'http://www.newurl.com');

Change content URL

UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://www.oldurl.com', 'http://www.newurl.com');

Change post meta

UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://www.oldurl.com','http://www.newurl.com');

About

Repository with SQL commands for migration of WordPress databases.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published