File Gallery WordPress plugin

It’s been what? Almost a year since my last post? What the hell? :D

Anyways, I’ve been “active” on a subpage, working on my “File Gallery” plugin for WordPress.

It took me a while to realize that people who have subscribed to my RSS feed have no idea about this plugin because its “home” is a page. It’s not included in the feed. I’m a moron.

So, the time here is currently 0:03 and I’m very tired.

But you’ve expected some kind of lame excuse for a short post from me, so this is no surprise.

Anywho…

WordPress File Gallery plugin is ready for testing – go go go!

ps: I’m alive and well, and working at Brlog ;)

And then…

… the magical, floating, multi-color space-orb just disappeared and I was able to go on with my so-called life.

Anyways, I was working on ZagrebDox for the whole month of February and it kind of took all of my time and energy, but ended up being a really nice project because I’ve, once again, learned a lot of new things about WordPress.

I’ve also learned a few new things about MySQL and how to crash your hosting provider’s shared server.

What happened:

  • the site has over 300 pages (each with at least 3 attachments)  and I’ve used a permalink structure which started with %category% – this combination produced waaay too many rewrite rules
  • there was a 20MB database size limit
  • for some reason, the wp_options->rewrite_rules field got duplicated ~10 times, and the database had grown to 50MB in no time
  • combine that with the 20MB limit and what you get is a bunch of never-ending transactions
  • so the server went kabang! and the site was promptly moved to another one

To solve the problem, I’ve changed the permalink structure to begin with %year%, disabled creation of rewrite rules for attachments (thanks to Johan Eenfeldt – his code has made my number of queries per page drop from ~3900 to ~90), set the number of post revisions to 2, and then repaired and optimized the database which now stands happily still at 5.7MB.

I don’t know how rewrite_rules field got duplicated, I haven’t used any plugins that would mess with it, so I’m still in the dark about that. What I do know is: you can’t host over 700 sites on one single server and expect everything to go smoothly until the end of days. Not to mention that the only available transport protocol is fsockopen which made the admin area a bit slow until I’ve blocked all the others…

There’s been some other stuff I’ve worked on, but I’ll put that in another post.

It’s lunch time. And I miss Ma.gnolia