Change and Update WordPress URLS in Database When Site is Moved to new Host

UPDATE wp_options SET option_value = replace(option_value, ‘http://www.oldurl’, ‘http://www.newurl’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

UPDATE wp_posts SET guid = replace(guid, ‘http://www.oldurl’,’http://www.newurl’);

UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldurl’, ‘http://www.newurl’);

UPDATE wp_postmeta SET meta_value = replace(meta_value,’http://www.oldurl’,’http://www.newurl’);

mysql> UPDATE wp_options SET option_value = replace(option_value, ‘http://www.oldurl’, ‘http://www.newurl’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
Query OK, 0 rows affected (0.00 sec)
Rows matched: 2 Changed: 0 Warnings: 0

mysql> UPDATE wp_posts SET guid = replace(guid, ‘http://www.oldurl’,’http://www.newurl’);
Query OK, 0 rows affected (0.02 sec)
Rows matched: 964 Changed: 0 Warnings: 0

mysql> UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldurl’, ‘http://www.newurl’);
Query OK, 0 rows affected (0.05 sec)
Rows matched: 964 Changed: 0 Warnings: 0

mysql> UPDATE wp_postmeta SET meta_value = replace(meta_value,’http://www.oldurl’,’http://www.newurl’);g
Query OK, 0 rows affected (0.01 sec)
Rows matched: 686 Changed: 0 Warnings: 0

Configure Automatic Updates WordPress


nano /wp-config.php


Change this….

//--- disable auto upgrade
define( 'AUTOMATIC_UPDATER_DISABLED', true );

To this…to update core, plugins and themes

//--- disable auto upgrade
define( 'AUTOMATIC_UPDATER_DISABLED', false );
define('WP_AUTO_UPDATE_CORE', true);
add_filter( 'auto_update_plugin', '__return_true' );
add_filter( 'auto_update_theme', '__return_true' );

Upgrade WordPress to 4.1 – The admin backend the connection times out

Upgrade WordPress to 4.1. The admin backend the connection times out and the server gets really slow:error “The server at domain.com is taking too long to respond.”

It looks like this is actually a common issue with this version of wordpress. https://wordpress.org/support/topic/multisite-extremely-slow-after-upgrading-to-41

1) Open database via phpMyAdmin
2) Open table “wp_options” and look for “db_version” entry.
3) If that entry has a number different to “30133” (in my case it was 27916), change it to “30133”.

If you are using MU muli-sites and all the multisites are having issues, try this:

WordPress MU uses one database and each blog gets his own tables with the blog id in the prefix, so once you install a network installation your database should have these tables:

wp_1_options,wp_2_options,wp_3_options, etc. Check multisites for the same database version and change accordingly.

Check the mail options table.


mysql> SELECT option_value FROM  wp_1_options WHERE option_name = 'db_version' LIMIT 1;
+--------------+
| option_value |
+--------------+
| 30133        |
+--------------+
1 row in set (0.00 sec)

Check multisites for the same database version and change accordingly.


mysql> SELECT option_value FROM  wp_2_options WHERE option_name = 'db_version' LIMIT 1;
+--------------+
| option_value |
+--------------+
| 27916        |
+--------------+
1 row in set (0.00 sec)

WordPress Error after moving site


Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with that of Walker::start_lvl() in /var/www/vhosts/mercedescourlandinteriors.com/httpdocs/wp-includes/post-template.php on line 1071

Path and other info here – https://wordpress.org/support/topic/fix-strict-standards-issues