Database slowdown after update to 3.4.1

If you’ve got 60,000 records, try cleaning post/page revisions; these really accumulate and cause excessively long queries. I’ve seen database sizes drop 90% with huge increases in performance. Run the query below in phpmyadmin or from the command line and then optimize: DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) … Read more

Database sync between local and production

If you have databases reachable from the outside ie: mysql1.example.com you can work on a local development environment connected to that the whole time. I just found a nice thing to put in wp-config.php to be able to change the host depending on your environment $host = $_SERVER[‘HTTP_HOST’]; define( ‘WP_HOME’, ‘http://’ . $host ); define( … Read more

I have a problem with my WordPress DB after I tried to install multi-site

You most probably only added one of the following in your wp-config.php file thinking they were the same, as m73mitchell and I had done: define(‘WP_ALLOW_MULTISITE’, true); define(‘MULTISITE’, true); I couldn’t find any documentation why they have this counterintuitive setup, but just add the one you missed and it should work.

How to correctly add a table to the WordPress MySQL database

Firstly I would try to avoid the use of a custom table using custom post types, custom taxonomies and post/user/term meta. This will greatly increase compatibility and give you a large chunk of free functionality, such as UIs, import/export support, archives, REST APIs, etc But assuming you cannot use that, for whatever reason, you should: … Read more