WebDevOnLinux | Web Development on Linux.

5 tips to clean and optimize the database Wordpress

By Steph on 11/03/2009 under BestOf, Wordpress

The size of the database will affect the loading time of your blog. We already saw how to optimize its load by modifying the file. Htacces s, but here we'll look at the size of your database. Indeed, many unused data can significantly increase the size of it. I suggest 5 ways to reduce it:

Beware: Expectation manipulation all I suggest you backup your database using the plugin WP-DBManager. or even working on a local version of your site (see article)

1) Disable or reduce the number of versions per item:

While the use of history is a good way to ensure that all changes on an article can be reversed quickly, this may be a waste of resource for your database.

To prevent the creation of versions, you can add the following line to your file wp_config.php

  'WP_article_REVISIONS' , false ) ; define ( 'WP_article_REVISIONS', false); 

In case you want to keep this option, two options available to you:

a) Limit the number of versions per item

You can limit the number of versions by adding artcile in your wp_config.php the following line:

  'WP_article_REVISIONS' , no_of_revision ) ; define ( 'WP_article_REVISIONS' no_of_revision); 

b) Automatically delete the versions of the articles dating back over a specified period.

Another way is to use the plugin to automatically delete the versions of articles. For this plugin delete revision fulfilled this role perfectly. It is available here.

2) Remove unused images:

Whenever you download an image, WordPress automatically creates copies thereof, rescaled to small and medium sizes. Most often, these images are not used. Similarly, there may also have some pictures you've downloaded, but do not n'utilisées. These images can easily spare increase the size of your directories and your database.

The DUI plugin will automatically scan all these images in your unused items. You then propose to delete the database and server.

3) Optimize the database

We have seen how to back up your database using the plugin WP-DBManager.

wp-dbmanager

One of the features of this plugin is to optimize the database, why go to Database-> Optmization DB and select the tables you want to optimize. Then click on the button ...

This can also be done automatically at regular intervals, why go to Database-> DB options and validate this optimization.

4) Removing uninstalled plugins options:

When you disable or uninstall a plugin, options or tables are not removed. If you install and uninstall many plugins there will be more and more unnecessary options and tables will increase the size of your database.

For plugins which have created tables in your database, you can use-Wp DBManager mentioned above to erase. For plugins which have created options, you can use the plug-clean option to remove the lost options.

5) Check for dead links

If you want to lower your bounce rates and improve your SEO, it is essential to monitor the links between articles. For this, simply install this plugin: Broken Link Checker for WordPress

This plugin will scan your items and you are going to display a report. Then you can choose to edit them or destroy them. For that, once installed go to Tools / Broken links.


Read also

You can continue your reading on similar topics by visiting the following items:

  1. Backing up Wordpress database
  2. Complete and automatic backup of your Wordpress blog.
  3. Wordpress permalinks for proper referencing
  4. Wordpress Plugins needed
  5. Automatic generation of sitemap Wordpress

:

3 Comments for this article

  • agatzebluz

    ooh there, here are tips that I follow.
    Thank you.

  • wikipedia

    Well I'm a fan of your extra items puissenen what they say! lol

  • Classics

    Thank you for the advice. My site is growing slowly and I try all ways to improve everything.

    I have some questions:
    - When you put the revisions to false. The historical already created they are automatically deleted? Is it retroactive wholesale?
    - How to know the fields to delete from the database without damaging the site? I have some lines that I have a problem, I do not know what it can match.

    In any case thank you for these already valuable info. :)
    I'll take a look at the rest of the site at once.

Post a reply