Why Attend WordCamps

While I’m at Vienna for WordCamp Europe I decided to share a few thoughts around what we are all here to do as a way to remind myself and others why we attend WordCamps. Here it goes, in no particular order:

Keep up with emerging trends — Attending conferences is a great way to get practical tips, keep up with emerging trends, and to meet other people doing amazing things.

Networking — You’ll probably find not just WordPress lovers but also Web geeks passionate about everything surrounding the Web. This is a great opportunity to meet new people and perhaps even, who knows, find that co-founder/business partner you’re looking for. It’s ok to skip a few sessions and just hang out at the Happiness bar or in the halls.

Learn — Be introduced to various new concepts and techniques. Various techniques for leveraging even more of WordPress are presented. How to secure WordPress, how to scale, optimize, improve, contribute, etc are covered in the different tracks.

Get Excited — Working on the Web presents many challenges and is becoming increasing more complex and more exciting. Mobile phones and retina displays are among the many things that are giving website owners more concerns they need to address, and discussion is hot right now about what are the best tools and techniques to be used.

Get better and better with WordPress — By end of the WordCamp you’ll probably feel your WordPress knowledge has increased a great deal.

How about you? Why do you attend WordCamps?

WordPress Orderby rand not working

If you’re working with the orderby parameter in get_posts/WP_Query to ‘rand’ beware of this report:

“I was developing a site on WP Engine. They actually disable the Orderby Rand Function. If you happen to be using WP Engine, in the dashboard area they put in the WP Admin go there scroll down and make sure the Orderby Rand function is not disabled. You would not believe what I went through before I deduced that it was the host causing the problem.”

Scalable WordPress Hosting

Just how far do the current WordPress hosting solutions go when you have a site with hundreds of thousands hits per day? Using loader.io I’ve set myself to test a few of the WordPress-specfic hosting solutions out there to test how they handle high traffic and stressful peak situations.

WPEngine (live environment)

Screen Shot 2014-03-27 at 15.58.06

Elasticdot (development mode)

The load test brought the web server down. The clarification provided by their support staff was: “since the App that you are testing out is in development mode, that App is served by a micro-Dot, the smallest available.” I would have to pay to test the live environment so I didn’t pursue further.

Linode (live environment)

Screen Shot 2014-03-27 at 16.11.03

Pantheon (live environment)

Screen Shot 2014-03-27 at 19.09.13

Also I would like to test WordPress running on HHVM but to date there isn’t a hosting solution out there that supports this out of the box.

P.S. : my MSc advisor would kill me for publishing such inaccurate results. A proper test would include several test runs, an average response time and a whole lot more information about how I’m conducting these tests. Basically these results are to be taken lightly and as a general guideline of what you would find by hosting a vanilla WordPress and pointing loader.io to it.

P.S. #2: I need a solution that can handle peaks of 2 million a day, if you have any ideas leave a comment. Thanks

WordPress as a Web Application Framework

WordPress is not a Web application framework, we know that.

But what is a framework anyway? I believe a framework should first and foremost offer you convenience and rapid development in a structured manner. WordPress started as a blog engine (a very simple one) but it is quickly evolving and with the right set of tools and techniques it can also become a quite good web application framework.

What makes WordPress great is its simplicity. But what are some of its shortcomings?

Knowing where we fall short

At WidgiLabs we have done several WordPress-based websites and we are generally very happy with them. However as we move more into the development of web applications and away from websites, WordPress poses a few problems:

  • it’s not cloud ready – although these days you can now even run WordPress on Google App Engine, it is still heavily dependent on MySQL as the database system and you’ll have trouble using cloud databases.
  • debugging is an arse – I’ve seen experts manage to have step-by-step debugging for WordPress projects but most developers are flying on print_r, var_dump and error_log.
  • no database migrations – making it hard for people to collaborate on scenarios where you have a custom database schema that evolves quickly over time.
  • no clear MVC separation – making it very easy to start mixing logic with presentation and that’s never good.

So how can one go about and use WordPress as a web framework and avoid being trapped with these problems? Here’s a list of what I’ve found helps, what can be solved and when you should stick to using something else.

Minimize the shortcomings

  • although WordPress is not cloud ready straight away from the installation package it is still possible to build very robust infrastructures where WordPress will run and handle hundreds of thousands of visitors with great speed and performance. A lot of documentation and video resources exist already on this subject and wordpress.com is the supreme example of what can be achieved (see the stats).
  • debugging has been improved quite a lot with tools such as the Developer plugin and the Debug Bar plugin. Using XDebug you can add the handy convenience of step-by-step analysis.
  • database migrations are less of a subject if you stick to using Custom Post Types and other structures that don’t involve custom database schemas evolving rapidly over time. In case you do then maybe using WordPress isn’t the best choice (or maybe someone can suggest a tool/workflow for this?)
  • As for clear separation between logic and presentation one should always use the theme guidelines and you can also use Backjone.js that now ships with the default WordPress.

Knowing what we do best

WordPress has a few things done right already and you can take advantage of them, namely:

  • updating is a breeze – it’s so fucking easy, I love it.
  • the plugin and theme architecture is great
  • the SEO – even Matt Cutts from Google has come out to admit WordPress is the best blog engine for SEO.
  • stepping into the CMS territory – with custom post types and meta fields WordPress is becoming a very good CMS.

WordPress started as just a blogging system, but has evolved to be a full content management system and so much more through the use of thousands of plugins, widgets, and themes. The roadmap for WordPress is to keep aiming at simplified publishing on the Web but it is possible that at the same time it will also provide the convenience and rapid development that we are all eager to have for web development?

What’s your take? Would you like to hear more about using WordPress as a Web Application Framework? What are the main challenges you’ve identified in using WordPress as a framework for building custom Web apps?