It has been a while. A busy late summer and Fall came in the way, and Christmas is coming up! Recently I did a bit of charity in the form of bringing a Wordpress site back to life.
A friend of mine has a bicycle shop in Barcelona called The Bike Club. A very personal and interesting little shop if you are into things on two wheels. But this is not the story. The story is about their website. This website was working well in the beginning, but what happened? There's no prize if you have already guessed the 'webdesigner' 'vanished form the face of the Earth'.
Like so many small businesses, you start out with a budget, that basically says 'economical' in the first paragraph, and then take it from there. Not always the wisest decision, but as ordinary human being without any webdesign qualifications, you are an easy target for people, who says they are.
There's nothing more simple, next to creating a Wix page, than to install a WP and throw a theme on it. On the surface it looks fairly nice. Might even have some bells and whistles. Problems starts when some functions are required and you install the first and best plugin, you can download. Maybe even many of them, as was the case. The next problem only makes the first ones worse, and that is when the webmaster stops answering the phone or replying to email, and goes AWOL. Things fairly quickly deteriorate from there.
This site couldn't load, and if it did, took literally minutes about it.
Tasked with resurrecting it, I first moved it to a proper hosting company. Then started forensics on the database, which was nearly 500MB. A ridicoulous size for a small nimple site. Turned out those lovely modules was filling up one of the tables with useless strings, and didn't clean out properly, as was expected. The TTL was ignored, and useless data kept accumulating. This particular table, when under normal conditions, should have no more than 2-300 rows. It had approx. 4,5 million, which I had to clean out by hand.
These 2 queries came in handy:
WHERE option_name LIKE '_wp_session%'
LIMIT 500 /* (or 100000 ...) */
SELECT * /*(or DELETE)*/
WHERE `autoload` = 'yes'
AND `option_name` LIKE '%transient%'
Things started to brighten up. Site was finally loading, and normal work could proceed.