diff options
author | Bradley Taunt <bt@btxx.org> | 2024-07-21 16:28:44 -0400 |
---|---|---|
committer | Bradley Taunt <bt@btxx.org> | 2024-07-21 16:28:44 -0400 |
commit | 92566dc38c2558ffea44244416af02613ff530dc (patch) | |
tree | c1d5fd7e80a8f908643d7da082732bd6072a282f /pages/wiki/wordpress/database_update.md | |
parent | 81298bf957d3f629b78990894863c4c7a3adb807 (diff) |
Port over existing posts, wordpress directory in wiki
Diffstat (limited to 'pages/wiki/wordpress/database_update.md')
-rw-r--r-- | pages/wiki/wordpress/database_update.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pages/wiki/wordpress/database_update.md b/pages/wiki/wordpress/database_update.md new file mode 100644 index 0000000..67d4b7b --- /dev/null +++ b/pages/wiki/wordpress/database_update.md @@ -0,0 +1,21 @@ +# WordPress Database Update + +The following page contains a collection of scripts to update WordPress for numerous things. + +## Updating the URL of the Database + + -- Replace in wp_options table + UPDATE wp_options SET option_value = REPLACE(option_value, 'example.com', 'example2.com') WHERE option_name = 'home' OR option_name = 'siteurl'; + + -- Replace in wp_posts table + UPDATE wp_posts SET post_content = REPLACE(post_content, 'example.com', 'example2.com'); + UPDATE wp_posts SET guid = REPLACE(guid, 'example.com', 'example2.com'); + + -- Replace in wp_postmeta table + UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'example.com', 'example2.com'); + + -- Replace in wp_usermeta table + UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, 'example.com', 'example2.com'); + + -- Replace in wp_users table + UPDATE wp_users SET user_url = REPLACE(user_url, 'example.com', 'example2.com'); |