Changer d’url pour son site

Pour réaliser votre migration WordPress, voici une interface légère pour exécuter vos requêtes :
https://www.adminer.org

 

Remplacer :

  • wp par son suffixe
  • ‘https://old.net’ par son ancienne url
  • ‘https://new.net’ par sa nouvelle url
  • adapter les url selon le protocole http ou https
UPDATE wp_options
SET option_value = replace(option_value, 'https://old.net', 'https://new.net')
WHERE option_name = 'home'
OR option_name = 'siteurl';

UPDATE wp_posts
SET guid = REPLACE (guid, 'https://old.net', 'https://new.net');

UPDATE wp_posts
SET post_content = REPLACE (post_content, 'https://old.net', 'https://new.net');

UPDATE wp_postmeta
SET meta_value = REPLACE (meta_value, 'https://old.net', 'https://new.net');

UPDATE wp_options
SET option_value = replace(option_value, 'http://old.net', 'https://new.net')
WHERE option_name = 'home'
OR option_name = 'siteurl';

UPDATE wp_posts
SET guid = REPLACE (guid, 'http://old.net', 'https://new.net');

UPDATE wp_posts
SET post_content = REPLACE (post_content, 'http://old.net', 'https://new.net');

UPDATE wp_postmeta
SET meta_value = REPLACE (meta_value, 'http://old.net', 'https://new.net');

 

Suppression des révisions

DELETE FROM ch_posts WHERE post_type = "revision";