Confirm Before Deleting WordPress Trash

I recently watched someone who using their phone and tablet for everything manage posts on their WordPress blog. One they intended to keep ended up in the Trash by mistake. Restoring it is easy enough, but the ‘Restore’ and ‘Delete Permanently’ links are very close to each other on a mobile screen and I got a little nervous seeing them tap restore 30px away from the kill button.

I’ve created a simple WordPress plugin that adds a confirmation step in the admin area before deleting or emptying the Trash.

It’s a pretty simple thing, just a little JavaScript to make sure the click was deliberate. Give it a go if you’d rather have an extra click than possibly try and recover a post from a site backup.

Download the Plugin

Trash Fail Safe for WordPress.

WordPress 5.0 and the Gutenberg High Drama

Considering how widely used and how widely extended WordPress is, it’s renowned for its backwards compatibility with new releases. The next major WordPress update – v5.0 – is due for release in a couple of days amid a shroud of hot drama over the stability of the new Gutenberg editor.

Gutenberg is a major redesign in the way Pages and Posts can be constructed within WordPress. It brings the concept of custom ‘Blocks’ which allow chunks of information to be presented in specific ways. Conceptually this approach has widespread support, but retrofitting it into the existing WordPress ecosystem is a challenge. The team have put a lot of effort into backwards compatibility, but it’s a complex process and there are widespread doubts about how smoothly that will go.

Knowing this the WordPress development team have been distributing a WordPress Classic Editor plugin to allow sites to keep the old editor with the new version of WordPress.

My advice would be for anyone updating an existing WordPress site is to first install and activate this plugin, and to only use the new Gutenberg editor once they’ve been able to test it on a staging version of their website. Gutenberg may well work fantastically with your theme and plugins, but it’s far from guaranteed and you don’t want to be trying it out in production!

 

The Design Conference 2017

The Design Conference#tdcbne17

2017 was my first year at The Design Conference, the creative brainchild of Matthew Haynes of Analogue Digital.

What a great event. Matt’s energy gets scaled up to Powerhouse proportions, mixed in with local & international speakers and blended with a big crowd and plenty of room for activities and the result was a really energizing atmosphere and a great experience.

The presenters spoke about a mix of their work, personal experiences, insights into their mindsets, creative & business processes, successes, failures and predictions.  The breakout talks gave practical advice and some hands on experience like the analogue illustration workshop with Sophia Mary Mac.

Some Takeaways

  • Wayne Thompson  — fonts are hard.
  • Dean Pool — practice creativity. Experiment. Have fun. Blend ideas.
  • Nadia Hernández — back yourself, have a go.
  • Mike Rigby — have reasons behind your work. Make 3D whales. Blow minds.
  • Kelly Thompson  — hone your craft, be adaptable.
  • Lauren Hom —  build off your personal projects. Listen to drunk ideas.
  • UsTwo Sydney — loved their transparency. Celebrate wins to push through the grind.
  • Prue Jones — the world is going to start changing faster. Get ready, and start planning that brain chip.
  • Cyrcle  — wow. Be fearless, go hard, ride the ups & downs, blow minds, make big things. Put a brush on a stick. (Kitters was there).

Seeing and hearing these stories made me want to get to work. An amazing event I’d highly recommend.

WordPress Backups to AWS S3

Amazon Web Services S3 (Simple Storage Service) is a cheap and reliable way of storing data and is ideal for backups. Scheduling regular automatic backups of your WordPress website to S3 is pretty easy with a plugin, but it can be worth tweaking your AWS Credentials for better security.

This post will show you how to create a new user on your AWS account that has limited S3 permissions. It means if your site is ever compromised and the credentials stolen you’ll be in a far better position than having used your root AWS details! It’s also especially useful if you are managing backups of multiple client sites and do not want cross-access.

Step 1 – Create a new user with IAM in the AWS Console

  • Log into the AWS Console. Go to Services > Security & Identity > IAM
  • Create a new user (e.g. backup_myexample)
  • Copy and paste the Access Key and Secret somewhere; we’ll use those within WordPress shortly.

After creating your new user, go to their Policies and create a new inline policy. We’ll use inline, rather than group permissions so that each user you create (for backing up different websites) is isolated to their own S3 path.

Give the policy a name and paste and modify this Policy Document. Change my_awesome_bucket and my_directory to the bucket and path you’re using for these backups.

{
  "Version": "2012-10-17",
  "Statement": [
  {
  "Sid": "Stmt1441240868000",
  "Effect": "Allow",
  "Action": "s3:*",
  "Resource": [
  "arn:aws:s3:::my_awesome_bucket",
  "arn:aws:s3:::my_awesome_bucket/website_backups/my_directory/*"
  ]
  }
  ]
}

Your screen should look a bit like this
AWS IAM Policy

Step 2 – Install & Configure BackWPUp

  • Log into your WP Dashboard, go to Plugins > Add New Plugin and search for BackWPUp
  • Install it and create a new job. For testing you may want to do Database backup only, or list of plugins. This is much faster that a full site (Files) backup. Once you know it’s working setup a full site backup.
  • Set the backup to S3 Service.
  • On the S3 Service page select your Region and paste in the Access Key and Secret key from before.
  • Type in your bucket name and path to store the backups. It should match the IAM Policy Document

s3-plugin-cfg

Save your settings and run the job.

The plugin logs will let you know if it worked.

A few notes

  • The IAM Policy allows all S3 actions on the given S3 path. I was not able to get this plugin to work with more restrictive permissions.
  • The new S3 Standard-IA class is good for these backups. The storage cost is cheaper than the Standard class without sacrificing redundancy as with Reduced Redundancy Storage. The downside is that downloads of these objects are more expensive.
  • Remember to check your backups periodically

New MikeHealy.com.au Website

It’s been quite a long time coming, but I have just launched a new website for myself. The previous site served me quite well and lasted almost eight years (120 human years).

The goals of this new website are to:

  • improve on the design
  • provide better information to potential clients
  • ultimately lead to more projects
  • (whilst also being easier to maintain)

The visual design brings the site into line with a branding refresh I did some time ago.

On the technical side I’ve built the site out with a custom WordPress theme and CMS development. WordPress is a massively popular open source Content Management System and is increasingly becoming the defacto standard for many of the client sites I’m asked to build. My development efforts here will translate well to newer skills required for client work.

I’ve also paid attention to mobile and tablet optimization, creating a responsive layout which will adapt to many different devices and screen sizes. Like WordPress, Responsive Web Design is also becoming the standard way to give visitors a good experience regardless of when and how they’re visiting your site.

I’d love to hear your thoughts on the redesign.