Migration base de donnée

Gist Interconnectit script Repo Git

SQL :

# Changer l URL du site
UPDATE {tabel_prefix}_options
SET option_value = replace(option_value, '{urlSearch.org}', '{urlReplace.org}')
WHERE option_name = 'home'
OR option_name = 'siteurl';

# Changer l URL des GUID
UPDATE {tabel_prefix}_posts
SET guid = REPLACE (guid, '{urlSearch.org}', '{urlReplace.org}');

# Changer l URL des médias dans les articles et pages
UPDATE {tabel_prefix}_posts
SET post_content = REPLACE (post_content, '{urlSearch.org}', '{urlReplace.org}');

# Changer l URL des données meta
UPDATE {tabel_prefix}_postmeta
SET meta_value = REPLACE (meta_value,'{urlSearch.org}', '{urlReplace.org}');