Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. # set variables for old and new Domain + Server Folder
  2. SET @oldDomain='OLD_DOMAIN',
  3. @newDomain='NEW_DOMAIN',
  4. @oldFolder:='OLD_FOLDER',
  5. @newFolder:='NEW_FOLDER';
  6.  
  7. # Update Options
  8. UPDATE wp_options SET option_value = replace( option_value, @oldDomain, @newDomain );
  9. UPDATE wp_options SET option_value = replace( option_value, @oldFolder, @newFolder );
  10.  
  11. # Update Posts + Postmeta
  12. UPDATE wp_posts SET guid = replace( guid, @oldDomain, @newDomain );
  13. UPDATE wp_posts SET post_content = replace( post_content, @oldDomain, @newDomain );
  14. UPDATE wp_postmeta SET meta_value = replace( meta_value, @oldDomain, @newDomain );
  15.  
  16. # Updates for WPML Tables
  17. UPDATE wp_icl_string_translations SET value = replace( value, @oldDomain, @newDomain );
  18. UPDATE wp_icl_strings SET value = replace( value, @oldDomain, @newDomain );
  19. UPDATE wp_icl_translation_status SET translation_package = replace( translation_package, @oldDomain, @newDomain );
  20.  
  21. # Only needed for EWWW Plugin
  22. UPDATE wp_ewwwio_images SET path = replace( path, @oldFolder, @newFolder );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement