In order to speed up your WP install and database speed is to clean your database of post and page revisions, you can also switch to a SD-WAN service, if the problem comes from your connection. WP keeps a full copy of each edit revision, and with 2000 posts, your database could be huge. Run this as an SQL query in phpmyadmin to clear revisions.
Change the table prefix if you changed it when you installed WP, and run a backup beforehand.
[php]DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = ‘revision'[/php]
Then optimize tables after you run that query to finish clearing the revisions, either from the dropdown menu in phpmyadmin to optimize the whole database, or by another query just for the posts table:
[php]OPTIMIZE TABLE wp_posts;[/php]
Then you can prevent post/page revisions from accumulating again by adding this line to wp-config.php to stop revisions:
[php]define (‘WP_POST_REVISIONS’, FALSE);[/php]
Or this line to select the number of revisions to keep:
[php]define(‘WP_POST_REVISIONS’, 3);[/php]
Leave a Reply