Images make a WordPress site looks good. However, images also make up the bulk of the size of the entire page. Nobody wants to wait for a slow site. There are some tools available such as JpegOptim, Optipng, Pngguant 2, SVGO and Gifsicle. Manually running these tools after WordPress resizing attachment images is tedious job. Luckily for you, with my newly published WP CLI package, optimizing WordPress media library’s PNGs, JPGs, SVGs and GIFs is just one command away.

The Story

One of my client has a very old news site, everything went well until we decided to use a new theme…

We have written come acceptance tests in the last tutorial. Time to run them on the cloud. No way I would spend 10 minutes to wait for my tests ran for multiple PHP and WordPress versions.

Continue from the last tutorial, I’ve removed some unused pieces and added PHP_CodeSniffer to the project. Nothing related to acceptance testing. Head over to the GitHub repo if you are interested.

Prevent Race Conditions

A problem I found is that the tests failed randomly. The reason is that our tests tries to click some links before they show up on the screen. …

Ever anxious about pushing new release of WordPress plugin causing the white screen of death on your clients’ sites? You should write some acceptance tests! I will demonstrate how to leverage Varying Vagrant Vagrants, Codeception and wp-browser to write acceptance tests for WordPress plugins.

The Tools


Codeception is a PHP testing framework built on PHPUnit that automates acceptance testing. It does functional and unit tests also.


wp-browser is a WordPress specific set of extensions for Codeception written by theAverageDev.

The package includes a class extending Codeception PhpBrowser module that adds WordPress related assertions for cest and cept tests, an extension of Codeception…

WP Cron is the schedule system implementation of WordPress. Unlike linux cron, it doesn’t guarantee jobs are performed on time. Ever wondered why your scheduled posts not posted at specific time but suddenly published when you log in to WordPress dashboard to check out what’s wrong? You are the victim of WP cron.

How does WP Cron Work?

Scheduled jobs are saved into database and wait for WP Cron to perform them. However, unlike traditional cron systems, it’s doesn’t watch the clock periodically.

WP Cron only checks for due jobs when any WordPress page is loaded.See the problem?Click To Tweet

WP Cron Problems on Low Traffic Sites

On a low-traffic WordPress site…

What is worst than having downtime? Answer: Having downtime without noticing it. Here come Uptime Robot, a free service let you create 50 monitors that checks every 5 minutes, not to mention email alert, mobile apps, API support and public status pages.

Start Monitoring in 30 Seconds

Syndicating content to third-party sites may not be safe. If don’t support the use of the rel=”canonical” tag. Chance are they outrank you on SEO and makes Google thinks they are the original authors. Worse still, Google penalise you on duplicate content. Good news is Medium do support canonical tags. Thus, you can trust Medium to repost your articles without hurting Google rankings.

Why Cross Posting to Medium?

First thing first, why re-posting WordPress content to Medium at all? The answer is simple: Get more readers that actually read! Medium has an algorithm to predict what type of articles one might want to read. …

Because no developer should ever cowboy coding, it’s important to have a local development WordPress environment. Varying Vagrant Vagrants lets you create and remove testing WordPress sites on local machine with ease.

By no doubt putting a nice set of eye-catching social share buttons on your pages is the first step to seduce visitors to share your content. There are thousands of share button plugins on the WordPress plugins repository makes choosing the right one become difficult than ever.

The Requirement

Responsive Social Share Buttons

According to We Are Social, mobile traffic increased by 39% from 2014 to 2015 with one-third of all web pages now visited on mobile devices.

Mobile-friendly share buttons are no longer optional! Click To Tweet

Fast Social Share Buttons

Page load speed is of utmost importance for any respectable website. We should not tolerate any delay because…

Ever think about hosting WordPress sites on Heroku? Think again. It’s not as easy as deploying Rails applications. In fact, it’s a headache. Besides the limits you find in the official document, I am showing you some of my thoughts on Heroku WordPress hosting.

Heroku is great for prototyping Rails apps. But, for #WordPress sites? No, a big no. Click To Tweet

Heroku’s Ephemeral Filesystem

Each dyno(Heroku’s term on its servers) gets its own ephemeral file system. When you uploaded an image, the image is stored on one of the dyno only. The images will be erased after dyno restart. …

Tang Rufus

freelancer for hire, wordpress developer,

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store