5 Of The Most Useful WordPress CLI Commands

Over the past couple of years I’ve gotten more involved with WordPress site management. One of the tools I seem to find very useful is the WordPress CLI.

WordPress CLI is a command line interface for interacting with a WordPress site.

Below is a small list of the commands I use most frequently.

WordPress logo primarily for presentation purposes.

Plugin updates

First up is a really quick command to run all plugin updates. I find this to be a pretty reliable and easy way of just running updates for all plugins in the repository. Due to the locked down nature of WordPress and the reliance of paid for plugins this command may not get all update but it does work with the vast majority of them.

Theme updates

As above this command is very easy and quick to just run any pending theme updates required on a site.

Core updates

Although updating Core in WordPress can be quick in the cms, I find running this alongside the above 2 commands is good practice and can be quite speedy.

Translation updates

This is one that often catches me out when running updates and pulling translations into the language folder. This is another 3 quick commands to just get it done.

Update User Information

Quickly running a password reset on a local or staging environment is something I do frequently. I find this command to be a quick and simple way of doing this.

There you have it, 5 of the most useful commands from the WordPress CLI. Often I am running plugin updates or making tweaks to users but let me know what your favourites are in the comments.

How WP Rocket improved my page performance

In this article I discuss my experience with the popular “WP Rocket” plugin. How it improved performance and whether it is worth the $49 price tag.

Introduction

During the past year and a half of working with WordPress websites I have encountered a large number of sites with performance issues. By my experience, larger WordPress sites are notoriously difficult to get good performance scores. This is down the nature of its table structures and some poorly optimised third party code. For a while we struggled to improve Page Insights speeds, that was until we discovered WP Rocket. At first I was a little skeptical, why would adding yet another plugin improve page performance.

What can you expect from the plugin?

After installing the plugin on one of our sites and only spending around 30 minutes tweaking the settings, the page insight score increased by almost 40%. WP Rocket has all the bells and whistles you’d expect: caching policies, gzip compression, cache reloading and more. The majority of which come preconfigured out of the box.

Alongside a list of basic features WP Rocket has a few extra separate services. These are a CDN and Imagify for image compression. These are directly built into the existing plugin making them extremely easy to setup.

How much is it and is it worth it?

A license for a single Website in WP Rocket costs just $49 / year for updates. In my opinion the amount of time this plugin saves, makes it worth the money.

Performance and Core Web Vitals

It’s important that performance issues are addressed as search engines nowadays are penalising websites for it. Google and other search providers are consistently changing the rules behind it and with recent changes to Core Web Vitals, performance is becoming more and more important.

To Conclude

Overall the benefit of WP Rocket is not only to improve your page speed but make it easy to do so. There are a vast array of configurable options making WP Rocket is fast to configure and greatly improves performance. WP Rocket isn’t an instant fix and a surefire way to score 100% every time but it is definitely a step in the right direction.

PHP CMS’ and which is right for your developer

This article aims to help you in picking which PHP CMS to use for your next project, with advantages and disadvantages to various options.

Introduction

Which Framework or CMS should I use? This is often one of most difficult and controversial decisions to make before you start building a website. This decision after all will affect you for the next few years and picking incorrectly can have huge consequences.

Throughout my career in web development I have come across and used a number of different PHP frameworks and CMS’. As you use them more and more, you build up an understanding of which jobs they are most suited for. In turn this allows you to be able to see which areas they might struggle.

The goal of this article is to describe my experiences of these different frameworks. From this you will hopefully be able to weigh up which one is most suited for a particular job. As a PHP Developer I only have experience working in smaller Web Agencies so I can’t speak for larger ones and in house teams.

Which Frameworks are we comparing?

Whilst writing this article I can only really comment on the frameworks I have used in the past to build sites these are as follows:

  • WordPress
  • Drupal (7 and 8)
  • Craft CMS

WordPress

WordPress backend interface

WordPress Photo from Unsplash (Stephen Phillips – Hostreviews.co.uk)

Let’s start with WordPress, one of the most well known CMS’ around at one point. According to W3 Techs, a company that specialise in Web Technology Surveys, WordPress’ market share of the internet is around 40%.

WordPress’ Advantages

WordPress’ popularity often makes it a go to choice for people wanting a CMS. It is a well known CMS, with plenty of articles and support forums to get help from. These advantages can make it easier to sell to clients. Due to this fact, WordPress has a comprehensive plugin store and vast array of different themes and starter templates.

Another advantage of WordPress is a user friendly admin experience, making it easy for new users to pick up.

WordPress’ Disadvantages

These advantages however do not make WordPress the ideal tool for every client. Whilst WordPress gives you a vast amount of features with the help of plugins, sometimes customers would more bespoke customisation options. This in my opinion is where WordPress is a little lacking when compared to other solutions.

Usually when building a new feature on a WordPress site, you can often find a plugin which will take you 90% of the way to what you need. If you are happy to work around these limitations or compromise on them, WordPress is a great choice. Getting that extra 10% right however is often where some of the fundamental issues of WordPress can occur. WordPress has this reputation where everything is very fast to develop and easy to use. Personally whilst using it for the past year or so I have seen times where this just isn’t the case. Especially when compared to newer CMS’ and frameworks on the market.

The way people perceive WordPress can be another key disadvantage. I think there is this thought that WordPress is easy to learn and build a site with. Whilst I find this partially true in order to build one that performs well, like anything it takes time. I’ve always found it tricky to get good performance scores on WordPress sites, unless it’s rather simple. This is because the more plugins and features you pack into the site, the slower it becomes. Sites only grow overtime adding more features and functions. Keeping this under control with WordPress is difficult as plugins are usually the only feasible way to get extra functionality quickly. You should therefore take the time to consider every change you make and be conservative with what you are doing.

WordPress’ Summary

So what type of project is WordPress good for? Well as I touched on above I can see WordPress being great for blogs or company brochure sites. Whilst other sites can be creating using tools like WooCommerce, I often find these sites suffer performance issues and are tricky to get right. E-Commerce sites often require large, customised features that I think are implemented better using more focused feature sets.

WordPress can be a good tool if your client is focused on key functionality but is open to accept a few compromises.

Whilst WordPress is customisable, it lacks some key features when compared to other CMS. This lack of features often makes it harder and more time consuming to develop bespoke functionality for.

Drupal

Drupal Backend Admin Interface
Drupal admin area

Drupal is the framework which I have most experience with. At first there were a few things that I found awkward and difficult. This is commonly referred to in the community as “the Drupal learning cliff”. Its approach and target audience is slightly different to WordPress’ in my opinion. It’s more aimed at site builders and has a large number of tools to support the structure and pages for a website.

The community is more aimed at being fully open sourced and you will very rarely if not ever, come across a module which the developer charges for.

Drupals Advantages

As a developer looking at Drupal I think it’s more of a framework with a CMS integrated. This is perhaps the biggest difference between it and WordPress. You have a greater number of available API’s when compared to WordPress to assist developers in doing common tasks. A few examples of these are giving more control over frontend registration, registering new tables (or entities) and giving you the ability to setup new fields to allow you to build a site of any type without any extra modules or plugins.

Another key advantage is the open source nature of its module system. This promotes a community where new features and bug fixes can be submitted by anyone. Meaning that code isn’t abstracted away or has that reliance on another company to support it.

Drupals Disadvantages

The main disadvantage I found was its learning curve. After spending a fair amount of time with it I think there are still things which confuse me about it. I found that it caused me issues whilst theming a particular element. It can be difficult, confusing and feel like Drupal can get in the way of this since you always need to conform to its standards.

Due to this it can be rather complicated and I have often found certain aspects of its theming system to get in the way and make a job more time consuming.

Drupal Summary

What type of site is Drupal good for? Well this is a tricky one, I find that it has a large number of features and modules to assist with building any website imaginable. I find that with those features built into core, performance issues can be a lot less rare. If you have little experience with it, there are still considerations to be made which can impact performance.

In my experience the Commerce module works very well. It can be a great choice if you want to get a site together quickly. Where I think it can be tricky is when you want a more customised experience. Like WooCommerce, Drupals Commerce module can make a lot of assumptions about how you want your site to function. If you are however happy and willing to make some compromises, it can be a good option.

If Drupal isn’t something you are familiar with take it slow, play with it a little and see some of the key benefits you can find with it. In comparison to WordPress, it is much more of a framework than a CMS. Once you get used to that, achieving the task at hand can be much faster due to its larger set of useful API’s or helper functions.

The key downsides to the framework is that because it is aimed at site builders, the CMS can feel cluttered and not friendly to users. In order to reduce that for normal site users, it can take time and care. I’ve noticed people say that the backend CMS is often a lot more daunting and confusing. So be prepared to be writing more documentation and assisting a client with content and site administration.

Craft CMS

Craft CMS backend screenshot
Happy Lager Craft Demo site backend.

Recently I’ve been diving into building sites within Craft. At first I wasn’t too sure about it. When working in an agency where speed is often key, I thought the lack of a theming system would slow the development process down. After speaking to some of the frontend team though, they see this as a huge advantage.

Craft CMS Advantages

is its simple user interface and mix of tools to allow you to build a site with specific requirements.

As I touched on in the above paragraph, one of the main advantages of Craft is that it allows a developer to have full control over the markup. This can be hugely advantageous and allow you to build a site with less restrictions.

I really like this in Craft and feel this is one of its greatest strengths. Of course with these strengths come weakness’ too.

Craft CMS Disadvantages

Unfortunately Craft has the least amount of plugins and a much smaller community backing it. This means that if there isn’t a plugin to achieve a specific requirement, you’ll unfortunately have to build it from scratch. It also means that when you encounter an issue, it’s much more difficult to find a solution for it.

Craft is also the only CMS in this list which you need to pay for in order to use. Whilst I feel like the cost is honestly worth it, I have to put it as a disadvantage when compared to other CMS’ on this list.

Finally due to the smaller community and lack of articles, it can take a lot longer to find the answer you need. A lot of the time this means I have to go through the source code of Craft with XDebug to look at how it works.

Craft CMS Summary

So what is Craft great for? I see Craft as an option which will take a lot more time to get the features you like but the lack of a theming system can be used to your advantage. Sites can be build with completely custom markup allowing the freedom and flexibility to build something with unique requirements. Simple brochure sites built in Craft can often take less time due to this but as feature sets of these sites increase, it can take much longer to build backend components with, when compared to other options on this list.

Craft has a much more modern approach to development than WordPress. Because of this, it’s great that you can easily reach for composer libraries speed up development time.

I get the feeling after using Craft for a while, it’s aim to to give you a CMS and framework to allow you to build bespoke websites the way you would like to. It tries not to make too many assumptions on how you should build your site. Depending on how you look at it this is either a good thing or bad. I’d say if you have a client with very bespoke requirements, Craft might be a great tool for the job, at the expense of it potentially taking a lot longer, especially for a backend developer.

Conclusion

To conclude, there isn’t really a single CMS or Framework that will fit every need or that is absolutely perfect. But I hope that this article might help you pick a better fit for your next site. If you have anything to add or disagree with any of my points, pop them in the comments below.