Wordpress / Blog Uploader

March 30th, 2009 in General.

I set up a Wordpress blog for my girlfriend and I last night to track the growth of our garden (you can check it out at http://plants.crepinc.com/). I was only 10 minutes into explaining that pictures had to be resized so as not to wreck the page, then uploaded via SCP and put in the right place with the right permissions, then finally linked in the proper manner when I realized that the whole process was way more complicated than it needed to be.

I hacked up the following two php pages to solve the issue. They allow you to upload an image (no fooling with ftp or scp), have it converted, named, and moved automatically, and generate the code to paste into Wordpress.

The comments in uploader.php explain everything, but the only thing you really need to know is that you need imagemagick installed.

The code is here: http://anna.crepinc.com/wordpress-uploader.tar.gz

Happy Blaggin’ ;-)