Difference between revisions of "WordPress"

From rbachwiki
Jump to navigation Jump to search
Line 7: Line 7:
* Check the wp-config.php file make sure everything is ok
* Check the wp-config.php file make sure everything is ok


== If you change the URL then you have to update the database also==
* Log into phpmyadmin
* click sql
UPDATE bd_options SET option_value = replace(option_value, 'http://www.oldurl.com', 'http://www.newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE bd_posts SET post_content = replace(post_content, 'http://www.oldurl.com', 'http://www.newurl.com');
UPDATE bd_postmeta SET meta_value = replace(meta_value,'http://www.oldurl.com','http://www.newurl.com');
UPDATE bd_usermeta SET meta_value = replace(meta_value, 'http://www.oldurl.com', 'http://www.newurl.com');
UPDATE bd_links SET link_url = replace(link_url, 'http://www.oldurl.com','http://www.newurl.com');
UPDATE bd_comments SET comment_content = replace(comment_content , 'http://www.oldurl.com','http://www.newurl.com');


==[[Open Source Software]]==
==[[Open Source Software]]==

Revision as of 16:36, 10 May 2022

Move Wordpress to a new server

  • Export the database.
  • Create a blank database in phpmyadmin with the same name
  • Import the database into the database you just created
  • Copy the entire folder over from the old installation to the new server
  • Check the wp-config.php file make sure everything is ok

If you change the URL then you have to update the database also

  • Log into phpmyadmin
  • click sql


UPDATE bd_options SET option_value = replace(option_value, 'http://www.oldurl.com', 'http://www.newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE bd_posts SET post_content = replace(post_content, 'http://www.oldurl.com', 'http://www.newurl.com');
UPDATE bd_postmeta SET meta_value = replace(meta_value,'http://www.oldurl.com','http://www.newurl.com');
UPDATE bd_usermeta SET meta_value = replace(meta_value, 'http://www.oldurl.com', 'http://www.newurl.com');
UPDATE bd_links SET link_url = replace(link_url, 'http://www.oldurl.com','http://www.newurl.com');
UPDATE bd_comments SET comment_content = replace(comment_content , 'http://www.oldurl.com','http://www.newurl.com');

Open Source Software