WordPress optimization for onl​ine newspaper

Observatorul de Bacau is a local newspaper from a small town in Romania.

The loading time of the site was 6.37 seconds.

Homepage of the site had 66 components with a total size of 1105.9 KB.

But the main problem was not the page size. The poor performance of the site was due to the lack of database optimization.

Optimizing Database

Although it is common for an online newspaper to have a massive database due to the high volume of content published over the years, we found an extremely large database of 1.2 GB.

To give you an idea, the database export file produced more than 200 million lines.

Database tables created by old plugins were still there, and we found a huge space occupied with duplicate indexes.

As an example, the posts table had ~150 MB of data and ~450 MB of indexes.

We cleaned the database tables and we have managed to reduce its size to less than half, ~510MB from 1.2GB.

Cleaning the files

Disk space occupied on the server was over 13 GB. There were six WordPress installs in different folders and subfolders, old and outdated.

Those installations of WordPress had themes and plugins all old and outdated and represented potential security holes.

Also, we found very large error_logs of over 1GB.

After we made a backup of the entire hosting account we started to clean everything and keep only the necessary stuff.

Optimizing images

Another issue that was affecting site performance on unoptimized photos for the web.

This is a common problem of online newspapers. There are many authors that publish articles on the site and they upload photos directly from the camera.

We found in the WordPress gallery pictures at very high resolutions, even 12 megapixels, that were occupying disk space and affecting loading speed of pages in which they were displayed.

We resized those photos to 1024*1024px, a normal resolution for viewing pictures online. After that we optimized them with WP Smush, which also decreased more the number of KB.

This way we managed to reduce the space occupied on disk from 13GB to less than 4GB.

Optimization plugins

The newspaper had 22 active plugins, some not recommended such as WP Postviews. This plugin makes quite inefficient writes to the database on each page view.

We replaced the bad plugins with better choices, eliminated redundant ones and decreased the number of plugins to 16.

We also configured page cache and database cache.

Since there are a large number of images displayed on the site we have implemented Lazy Load to get a better loading speed.

We updated both WordPress and all plugins to the latest versions.


Although Bacau Observatory is still hosted on a shared hosting package, after we optimized it the average speed of the site is now 2.65 seconds with a 60% improvement.

It could be better by moving to a better hosting but that’s the owner’s choice.


Leave a Reply

Your email address will not be published. Required fields are marked *