AaronRutley.com

Install WordPress locally in under 5 seconds with ValetPress

Posted in WordPress on the 1st of June 2016 by @aaronrutley

I recently created a command line tool called ValetPress, with it I was able to get WordPress’ famous 5 minute install down to 4.7 seconds.

Here’s a screenshot of ValetPress in action:

A few weeks ago the Laravel team released a tool called Valet, which they call a “Development environment for Mac minimalists”Out of the box Valet supports WordPress & it could be considered an alternative local development option, comparable to MAMP or VVV.

I’ve just switched from VVV over to Valet & I really like it so far, some of the reasons why:

  • Lightweight (uses around 7MB of RAM)
  • Share local sites with your team / client (uses ngrok)
  • No host file edits (uses dnsmasq)
  • Supports other projects out of the box (Bedrock, Craft etc)

The main reason I was using VVV was for the VV site wizard, it’s a great tool for productivity, with a few simple commands you have have a site setup and configured easily. After using VVV for a couple of years I was finding it slow to boot and provision, it felt like a large overhead for some of the projects I’ve been working on.

I decided to create ValetPress to bring some of the VV site wizard functionality over to Valet. You can find the install instructions and more docs over on the ValetPress GitHub repo. It’s really just a wrapper for a bunch of WP-CLI commands (which I can thank for the quick install as it caches the latest copy of WP).

Right now there are six commands available :

  • vp empty to create a empty WP site with the 2016 theme (4.7 seconds)
  • vp create to create a WP site from your starter git repo (~28 seconds)
  • vp clone to create a WP site from an existing git starter repo
  • vp start to start working on an existing project / theme
  • vp delete to delete a ValetPress project
  • vp help to see a list of available commands

If you’d like to learn a bit more about Valet checkout this video: Laravel Valet is the Bomb and this post Use Laravel Valet for a Super Quick Dev Server.

If you have any suggestions or ideas for extensions to ValetPress please let me know!

Side note

I understand why most developers would like to ensure their local environment is a mirror of production. That hasn’t been an issue for me as most of the code I’m writing has to run on all kinds of environments and I haven’t had that with VVV. If I did however need to mirror a production server for a WordPress project I’d use something like Chassis.

Share this post

Menu