Insights

Article date · reading time

Tips to optimise a WordPress database

Charlotte Craig

Founder & Web Strategist

Tips to optimise a WordPress database

On This Page

Use the article headings to move through the advice.

Share this article

This website has been running for a couple of years now, and the database has continued to grow with it!  Yesterday I looked into how I could remove some of the redundant content and reduce the overall size.

I found an article by ProBlogDesign entitled “How to Optimize a WordPress Database” which was very helpful.

In particular, I found the following points the most handy:

  1. MySQL Optimize:

    In phpMyAdmin, just select the table, go to the “Operations” tab, and then click “Optimize Table.”

  2. Delete All Post Revisions:

    Add this line to your wp-config.php file to stop future revisions being stored:

    [php]
    define(‘WP_POST_REVISIONS’, false);
    [/php]

    Then clear all the revisions stored in the database with this SQL command:

    [sql]
    DELETE FROM wp_posts WHERE post_type = ‘revision’;
    [/sql]

There are many more things you can do to ensure your database is running as efficiently as possible.  Check out Michael Martin’s post to find out more.

“Technology may change how websites are built. But it’s human insight that makes them matter.”

— Neon Web Design

Our Services

Websites With Strategy Behind Every Pixel

From startup sites to advanced platforms, I create websites that look incredible and deliver results.

Let’s Build Something Brilliant Together

Have a project in mind or want to learn more? I’d love to hear from you.

Scroll to Top