Tag Archive - wordpress

Using AWS Auto Scaling with an Elastic Load Balancer cluster on EC2

Back in June last year I wrote about creating a WordPress cluster on Amazon’s EC2. In this post I’ll run through a couple of the problems with that cluster, I’ve experienced, and how I solved them with Amazon’s Auto Scaling service.

The problems with the cluster

A couple of things were not ideal with the cluster that I’ve been putting up with for far too long but finally set aside some time this afternoon to fix.

1) The price of micro-sized spot instances spikes, to crazy prices, sometimes.
This has meant that although the price of micro instances while they’re running is cheap, when the price spikes they all die off and leave the cluster vulnerable. Unfortunately to set up auto-scaling in combination with spot-priced micro instances would require coding up a hybrid solution with shell scripts, and although I enjoy tinkering with this setup, I can’t justify that much effort when an out-of-the-box solution exists, Auto Scaling.
Continue Reading…

How to Edit and Disable Checkout Fields in Woocommerce

This is just a quick post that shows you how to edit or disable the checkout fields in Woothemes WordPress shopping cart Woocommerce. It may make all the Magento developers jealous to see how nearly trivial it is – but I couldn’t see a good blog post explaining it, so here goes.

Disabling and Editing Checkout

To use the WordPress API, I made a simple little plugin that listens for the filter event and then makes some changes to the arrays.

The anatomy of a plugin is really just a class definition, in the constructor you listen for events and bind them to functions of that class. In those functions, you do the real grunt work. In this case, that’s where I weed out disabled fields, and swap in my edited field definitions.

Hopefully the way the code is laid out makes the actual editing/disabling is performed self-evident. To see the full range of available fields and options, please see the underlying array declaration in the core file woocommerce/classes/checkout.class.php.

My class looks like this:
Continue Reading…

Clustering WordPress on Amazon EC2 micro instances

If you are reading this, you are an unwitting participant in my latest experiment: clustering my blog on Amazon EC2 – thanks! You will be connecting to my blog on one of several Amazon EC2 micro instances, cobbled together in a quick and dirty solution that was more knee-jerk reaction to some downtime, than well thought out project.

This post serves as a chance for me to test if the cluster works, and a summary of the architecture I have set up using several EC2 micro instances and WordPress. It’s a quick and dirty little WordPress cluster using spot-request micro instances at $0.007/hour – how fun!
Continue Reading…

Magento vs Wp-E-Commerce: a comparison case study

Being a computer programmer typically means all of your friends and family immediately assume you a) can fix their wireless router and b) want to. For the same reason we often get asked to help make a website, blog, webstore, killer web 2.0 app or all of the above – which in the most part I can’t help with through lack of spare time. But I did manage to fit a WordPress + WP-E-Commerce project in, and this is a case study of that development project in particular, comparing WP-E-Commerce to Magento.

My girlfriend Cindy asked me to help with her latest venture, Cheap Titles – so naturally I helped whip up a site. Despite spending most of my time developing Magento, I actually thought I’d give the WordPress + WP-E-Commerce combo a try. I’ll summarize my rationale for that in the next section – suffice to say it made some things a lot easier.

So this is a little blog post that summarizes my experiences making the site with WP-E-Commerce, what I noticed different about the platform, as compared to Magento – and in particular how I found the underlying code quality of WP-E-Commerce measured against Magento.

Continue Reading…

WordPress: Blank page after posting comments and Akismet

Just a real real quickie related to WordPress here, not Magento. If you find adding comments in wordpress causes a blank page – try disabling akismet. If that fixes it, it probably means the domain you were using to test with in the comments field has been marked as spam by Akismet. WordPress serves up the blank page as a feature to prevent spam bots. No errors were logged though, so it made it a bit tricky to figure out what’s going on.

There are loads of other people with this problem, or variations of it online – googling around there semeed to be a lot of confusion – my sugegstion is to try disabling akismet first.

Other possible causes though I found and tried before getting to Akismet: Old theme with incorrect comment form on a newer version of wordpress – compare it to the default theme for your version of wordpress. Caching – try disabling your cache if you use one.

Hope that saves someone some time. Magento content coming soon, promise…