Author Archives: Richie

Sass WordPress image alignment

When you are writing a wordpress theme from scratch you are probably going to need to write some css to get the image alignment classes in the WordPress editor to do something meaningful. If you are using sass to preprocess your css here a simple sass placeholder class that you could use in your in your theme and everytime you start a new one. I have created a gist on github that is really basic alignment stuff that you will probably always need. You can use it in your theme’s sass files simply by including it and then extending your post or page classes.

  @extend  %post__img;


Plugins in WordPress can’t be deleted or installed?

If you can’t add or delete plugins in WordPress then you have probably messed up the user capabilities for your administrator roles. I did this when I moved a WordPress multi-user account to a standalone WordPress install. To fix this you are going to have to edit your WordPress database. User capabilities are stored in the database in the wp_options table as a serialized array. Understanding how the array is serialized is the key to fixing this issue. Here is how to go about it.

Editing Serialized Data

If you are going to do this then you need to backup your database. Editing as serialized array is not for the faint-hearted. Remember if you are adding or removing keys you need to update the length of the array otherwise it will break so use this information with caution.

Vagrant WordPress

Vagrants is a portable development environments which can be used as part of your web development workflow.
Varying Vagrant Vagrants or vvv is Vagrant configuration focused on WordPress development.
In this screen-cast I  set up a Vagrant WordPress development environment using Varying Vagrant Vagrants. It was pretty straight forward to do. The only thing I assume is that you have Git set already. The biggest headache I encounter was the fact that Varying Vagrant Vagrants is quite possibly the worst name ever.

Setting up a Vagrant WordPress

Vagrant and Varying Vagrant Vagrants looks promising. I’m not sure if I will drop my xamp work flow straight away but I will certainly be keeping an eye on it.