Archive for the 'work' Category

Nov 29 2009

Wordpress Edit Post Blank Page – Solved.

Published by Rob Taylor under work

I have had a problem where when editing seemingly large wordpress pages I am served up a blank page instead of the editor. This seems to happen soley on large pages, but there was no common limit.

Digging abit further I managed to fix it by looking at the database that ran the wordpress install. The blog had around 300 posts, but the WP_POSTS had roughly 3000 posts in it!

What happens is while editing pages various ‘autosaves’ are created, which is great for backups and revisions. A problem arises when the pages are massive, as multiple copies are created and not always cleared. When the wordpress editor loads up, it must attempt to load all these extra versions, which combined means wordpress/server/the world craps out and stops working.

To solve this, you need to view the raw database, and take these steps, please backup your database before doing so!

  • find out the post id number by hovering over the ‘edit’ link in your wordpress admin area.
  • open phpmyadmin and view the WP_POSTS table
  • Use the ’search’ function in phpMyAdmin to find the ‘post title’ of the entry you want (use the %%Like%% option)
  • A page of results will come up
  • Click ‘id’ to sort by ID
  • The page will rejig, the lowest post number will probably be the ‘live’ post, you can tell by looking at the ‘post name’ field, and if it says ‘autosave’ then its one of the ones taking up room!
  • I then delete all but the real post, obviously, and the latest autosave post.
  • Voila, wordpress now only has the normal post and one autosave to load.
  • Job done.

I hope this helps others as I can see alot of queries in google over this!

No responses yet

Mar 08 2007

pgp exporting private keys

Published by Rob Taylor under work

Every few months I am in the fun position of having to juggle around some PGP keys between servers. While doing this I always spend fifteen minutes trying to remember the right export commands so here for my own and google users reference:

export PGPPATH=”/path/to/pgp/”

This is used if you are using a none default PGP path.

To do the actual exporting you need four bits of info; the PGP command, PGP user, export filename and the location of the public and private key
pgp -kx $pgpuser $exportfilename secring.skr

Things dont get more exciting than that.

One response so far