Skip to content

Instantly share code, notes, and snippets.

@Golgarud
Created August 25, 2016 09:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Golgarud/9574e152952c23f7223a21c088bcdc1f to your computer and use it in GitHub Desktop.
Save Golgarud/9574e152952c23f7223a21c088bcdc1f to your computer and use it in GitHub Desktop.
migration WP
# 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}');
############################
# SPECIFIQUE ALETEIA #
############################
# Changer l URL des argument aleteia
UPDATE {tabel_prefix}_a_argument
SET detail = REPLACE (detail,'{urlSearch.org}', '{urlReplace.org}');
# Changer l URL des document aleteia
UPDATE {tabel_prefix}_a_document_reference
SET sourceUrl = REPLACE (sourceUrl,'{urlSearch.org}', '{urlReplace.org}');
# Changer l URL des theme
UPDATE {tabel_prefix}_a_theme
SET citation = REPLACE (citation,'{urlSearch.org}', '{urlReplace.org}');
UPDATE {tabel_prefix}_a_theme
SET commentaires_aleteia = REPLACE (commentaires_aleteia,'{urlSearch.org}', '{urlReplace.org}');# 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}');
############################
# SPECIFIQUE ALETEIA #
############################
# Changer l URL des argument aleteia
UPDATE {tabel_prefix}_a_argument
SET detail = REPLACE (detail,'{urlSearch.org}', '{urlReplace.org}');
# Changer l URL des document aleteia
UPDATE {tabel_prefix}_a_document_reference
SET sourceUrl = REPLACE (sourceUrl,'{urlSearch.org}', '{urlReplace.org}');
# Changer l URL des theme
UPDATE {tabel_prefix}_a_theme
SET citation = REPLACE (citation,'{urlSearch.org}', '{urlReplace.org}');
UPDATE {tabel_prefix}_a_theme
SET commentaires_aleteia = REPLACE (commentaires_aleteia,'{urlSearch.org}', '{urlReplace.org}');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment