Using Chassis for WordPress Development

Share this article

When I wrote the first article on WordPress and Vagrant I introduced WordPress VVV. VVV is a Vagrant configuration for developing WordPress themes and contributing to the core. One common problem, however, is that many people were overwhelmed with VVV. Especially those new to Vagrant, who just wanted to get something simple up and running fast. There are many other Vagrant configurations, one of the easiest to use and most popular in WordPress circles is Chassis.

Chassis for WordPress Development

Chassis is a simple Vagrant configuration, popular among WordPress plugin and theme developers. It’s easy to get started with and use on a per project development. In this article I’ll walk you through setting up Chassis. The folder structure is a bit different, so we’ll get into that too. The Chassis configuration has a hierarchy, so understanding how that works is also important. The last topic we’ll cover is extending Chassis by adding plugins that include more features.

Why Use Chassis?

There are several reasons why someone would choose to use Chassis for WordPress development. Firstly, Chassis is lightweight. In contrast, VVV is rather heavy as it comes with a wide range of tools. The problem with VVV is that it can take a long time to install, and it’s slow. In comparison, Chassis takes just a couple of minutes to install.

Chassis is so lightweight, that it only comes with:

  • WordPress 4.0
  • PHP 5.4 (includes the cURL and GD extensions)
  • Nginx
  • MySQL

Where is phpMyAdmin? Everything else that you may want to install, such as phpMyAdmin for example, comes as an extension. Memcache is also available, Xdebug is comming soon.

The installation is easy and the Chassis documentation covers it very well. You need to install the latest version of Vagrant and VirtualBox. However, Chassis requires an additional tool to work with the network. You can choose either Bonjour or Avahi. If you’re on Mac then you will already have Bonjour pre-installed. If you’re on Windows you can install Bonjour via iTunes. If you use Linux then you’ll have to install Avahi by executing:

[shell]
sudo apt-get install avahi-dnsconfd
[/shell]

Installing Chassis

You can get a copy of Chassis from the GitHub repo, just execute:

[shell]
git clone http://github.com/Chassis/Chassis.git chassis
cd chassis
git submodule update –init
[/shell]

The command git submodule update --init makes sure you download every submodule.

Installing Supercharger

A nice feature of Chassis is the separation of the WordPress and development directories. By default the folder that contains the themes, plugins and uploads folder is the content folder. When you first clone the repository, there is no content folder. The WordPress folder is called wp but there is no content folder. You can start creating the folder yourself and build the structure. The team behind Chassis has a predefined content folder available on GitHub (called ‘Supercharger’). Supercharger comes with some plugins, such as WordPress SEO, WordPress Importer, Limit Login Attempts and the Regenerate Thumbnails plugin.

[shell]
git clone https://github.com/Chassis/Supercharger.git content
cd content
git submodule update –init
[/shell]

To get up and running, you only need to vagrant up and everything will be installed. Chassis uses a ‘precise64’ box by default. The first time you vagrant up the project the box will be downloaded if no other Vagrant configuration has used it before. To do this, navigate to the root of the project and then execute:

[shell]
vagrant up
[/shell]

Wait until the installation finishes. You now have a ready to use environment. Everything is pre-configured, there’s no need for the famous 5 minutes configuration. After the installation finishes, visit http://vagrant.local/ in your browser and see if it works. You should see a ready to use WordPress site, skipping the installation process.

You may have noticed that after installation there are two new files. The local-config-db.php file and local-config-extensions.php. Don’t edit these files. They’re generated using the config.yaml configuration. If you want to edit these files, you’ll need to edit config.yaml and then provision using vagrant provision.

Folder Structure and the Configuration Hierarchy

Chassis separates the WordPress folder from the content folder. By default, Chassis disables the auto-update so you’ll have to install any updates manually. Separating the folders is a good decision. Using this separate content folder doesn’t mean that you can’t work with the wp-content folder, but it’s better to stick with the content folder.

config.yaml has a hierarchy. config.local.yaml has the highest priority then config.yaml in the content folder. By default these configuration files don’t come with Supercharger. You can copy the existing file from the root folder of the project. config.yaml and config.local.yaml in the root folder of the project have the least priority. config.local.yaml always has the highest priority in the particular folder.

When you start with a fresh folder you’ll only have one config.yaml in the root folder. This is the lowest priority. Inside that file you can configure the PHP version (5.4 by default), the WordPress directory (/wp by default), the database configuration and WordPress credentials.

Let’s experiment a little. First open vagrant.local/phpinfo.php to see what PHP version you’re using. By default you start with 5.4. Copy the config.yaml to the content folder. Edit the PHP version and set it to 5.5. Execute vagrant provision and after the provision navigate again to vagrant.local/phpinfo.php.

PHP version 5.5 with Chassis

Copy the config.yaml from the content folder and rename the copy you just created to config.local.yaml. Again, edit the PHP version to 5.4 again. Execute vagrant provision and test it in your browser.

PHP version 5.4 with Chassis

Try the same thing with the admin configuration. On config.local.yaml edit the password to “thepassword”. Execute vagrant provision again and test it to login in with this password on the dashboard. The password is wrong. So why is that? You can’t change the password or the admin credentials via provision. However, if you vagrant destroy and vagrant up again, you will see that the password for the admin is now “thepassword”.

Be careful with this configuration. Try to separate the local configuration from the deployment configuration.

Plugins for Chassis

Chassis supports extensions, I’ll cover a few of the popular ones.

MailCatcher
As you can see from the name and icon, this is a tool that catches emails that are sent to it and displays those in a web interface. This tool is used for testing purposes, when you don’t want emails sent to a real email provider, but you also need to see if it works. Installing this tool using Chassis is easy so you don’t have to worry about configuring anything.

[shell]
cd extensions
git clone https://github.com/Chassis/mailcatcher.git mailcatcher
cd mailcatcher
git submodule update –init
cd ../..
vagrant provision
[/shell]

Copy the Mailcatcher repository on Chassis to the extensions folder and then vagrant provision. Now go and add a comment to a post. Navigate to http://vagrant.local:1080/ and you will see that mailcatcher has ‘caught’ the email.

Chassis and the mailcatcher extension

phpMyAdmin
I don’t think that this tool needs any introduction. This is one of the most popular tools when dealing with databases. Just like MailCatcher, this extension doesn’t need any configuration at your end. The installation is similar to MailCatcher.

[shell]
cd extensions
git clone https://github.com/Chassis/phpMyAdmin.git phpmyadmin
cd ..
vagrant provision
[/shell]

Now navigate to vagrant.local/phpmyadmin and you’ll see that no login is required.

Memcache
When you’re developing a website with WordPress, you don’t know for sure how much traffic the website is going to get. High volumes of traffic is a nice thing, but have you thought about how you’re going to handle it? It’s possible that your server will crash from the huge amount of requests, or in the best case scenario your site will become slow. This is where caching comes in. This is the definition of Wikipedia for Memcached:

Memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

The Memcache extension installs Memcached properly, you can read the documentation for information on how to use this extension.

Conclusion

Using Vagrant and Chassis is one of the easiest to use and fastest environments for WordPress development. It has a good workflow by separating the WordPress installation from the working folder. It’s also simple, yet powerful when it comes to extensions.

Aleksander KokoAleksander Koko
View Author

Aleksander is young developer who loves to play with the newest web technologies. In his free time, he reads about PHP, Firefox OS or experiments with a new language. Currently, his main interests are PHP design patterns, laravel, dart and cloud.

chassisChrisBvagrantVirtualBoxvvvWordPress
Share this article
Read Next
Creating Fluid Typography with the CSS clamp() Function
Creating Fluid Typography with the CSS clamp() Function
Daine Mawer
Comparing Full Stack and Headless CMS Platforms
Comparing Full Stack and Headless CMS Platforms
Vultr
7 Easy Ways to Make a Magento 2 Website Faster
7 Easy Ways to Make a Magento 2 Website Faster
Konstantin Gerasimov
Powerful React Form Builders to Consider in 2024
Powerful React Form Builders to Consider in 2024
Femi Akinyemi
Quick Tip: How to Animate Text Gradients and Patterns in CSS
Quick Tip: How to Animate Text Gradients and Patterns in CSS
Ralph Mason
Sending Email Using Node.js
Sending Email Using Node.js
Craig Buckler
Creating a Navbar in React
Creating a Navbar in React
Vidura Senevirathne
A Complete Guide to CSS Logical Properties, with Cheat Sheet
A Complete Guide to CSS Logical Properties, with Cheat Sheet
Ralph Mason
Using JSON Web Tokens with Node.js
Using JSON Web Tokens with Node.js
Lakindu Hewawasam
How to Build a Simple Web Server with Node.js
How to Build a Simple Web Server with Node.js
Chameera Dulanga
Building a Digital Fortress: How to Strengthen DNS Against DDoS Attacks?
Building a Digital Fortress: How to Strengthen DNS Against DDoS Attacks?
Beloslava Petrova
Crafting Interactive Scatter Plots with Plotly
Crafting Interactive Scatter Plots with Plotly
Binara Prabhanga
GenAI: How to Reduce Cost with Prompt Compression Techniques
GenAI: How to Reduce Cost with Prompt Compression Techniques
Suvoraj Biswas
How to Use jQuery’s ajax() Function for Asynchronous HTTP Requests
How to Use jQuery’s ajax() Function for Asynchronous HTTP Requests
Aurelio De RosaMaria Antonietta Perna
Quick Tip: How to Align Column Rows with CSS Subgrid
Quick Tip: How to Align Column Rows with CSS Subgrid
Ralph Mason
15 Top Web Design Tools & Resources To Try in 2024
15 Top Web Design Tools & Resources To Try in 2024
SitePoint Sponsors
7 Simple Rules for Better Data Visualization
7 Simple Rules for Better Data Visualization
Mariia Merkulova
Cloudways Autonomous: Fully-Managed Scalable WordPress Hosting
Cloudways Autonomous: Fully-Managed Scalable WordPress Hosting
SitePoint Team
Best Programming Language for AI
Best Programming Language for AI
Lucero del Alba
Quick Tip: How to Add Gradient Effects and Patterns to Text
Quick Tip: How to Add Gradient Effects and Patterns to Text
Ralph Mason
Logging Made Easy: A Beginner’s Guide to Winston in Node.js
Logging Made Easy: A Beginner’s Guide to Winston in Node.js
Vultr
How to Optimize Website Content for Featured Snippets
How to Optimize Website Content for Featured Snippets
Dipen Visavadiya
Psychology and UX: Decoding the Science Behind User Clicks
Psychology and UX: Decoding the Science Behind User Clicks
Tanya Kumari
Build a Full-stack App with Node.js and htmx
Build a Full-stack App with Node.js and htmx
James Hibbard
Digital Transformation with AI: The Benefits and Challenges
Digital Transformation with AI: The Benefits and Challenges
Priyanka Prajapat
Quick Tip: Creating a Date Picker in React
Quick Tip: Creating a Date Picker in React
Dianne Pena
How to Create Interactive Animations Using React Spring
How to Create Interactive Animations Using React Spring
Yemi Ojedapo
10 Reasons to Love Google Docs
10 Reasons to Love Google Docs
Joshua KrausZain Zaidi
How to Use Magento 2 for International Ecommerce Success
How to Use Magento 2 for International Ecommerce Success
Mitul Patel
5 Exciting New JavaScript Features in 2024
5 Exciting New JavaScript Features in 2024
Olivia GibsonDarren Jones
Tools and Strategies for Efficient Web Project Management
Tools and Strategies for Efficient Web Project Management
Juliet Ofoegbu
Choosing the Best WordPress CRM Plugin for Your Business
Choosing the Best WordPress CRM Plugin for Your Business
Neve Wilkinson
ChatGPT Plugins for Marketing Success
ChatGPT Plugins for Marketing Success
Neil Jordan
Managing Static Files in Django: A Comprehensive Guide
Managing Static Files in Django: A Comprehensive Guide
Kabaki Antony
The Ultimate Guide to Choosing the Best React Website Builder
The Ultimate Guide to Choosing the Best React Website Builder
Dianne Pena
Exploring the Creative Power of CSS Filters and Blending
Exploring the Creative Power of CSS Filters and Blending
Joan Ayebola
How to Use WebSockets in Node.js to Create Real-time Apps
How to Use WebSockets in Node.js to Create Real-time Apps
Craig Buckler
Best Node.js Framework Choices for Modern App Development
Best Node.js Framework Choices for Modern App Development
Dianne Pena
SaaS Boilerplates: What They Are, And 10 of the Best
SaaS Boilerplates: What They Are, And 10 of the Best
Zain Zaidi
Understanding Cookies and Sessions in React
Understanding Cookies and Sessions in React
Blessing Ene Anyebe
Enhanced Internationalization (i18n) in Next.js 14
Enhanced Internationalization (i18n) in Next.js 14
Emmanuel Onyeyaforo
Essential React Native Performance Tips and Tricks
Essential React Native Performance Tips and Tricks
Shaik Mukthahar
How to Use Server-sent Events in Node.js
How to Use Server-sent Events in Node.js
Craig Buckler
Five Simple Ways to Boost a WooCommerce Site’s Performance
Five Simple Ways to Boost a WooCommerce Site’s Performance
Palash Ghosh
Elevate Your Online Store with Top WooCommerce Plugins
Elevate Your Online Store with Top WooCommerce Plugins
Dianne Pena
Unleash Your Website’s Potential: Top 5 SEO Tools of 2024
Unleash Your Website’s Potential: Top 5 SEO Tools of 2024
Dianne Pena
How to Build a Chat Interface using Gradio & Vultr Cloud GPU
How to Build a Chat Interface using Gradio & Vultr Cloud GPU
Vultr
Enhance Your React Apps with ShadCn Utilities and Components
Enhance Your React Apps with ShadCn Utilities and Components
David Jaja
10 Best Create React App Alternatives for Different Use Cases
10 Best Create React App Alternatives for Different Use Cases
Zain Zaidi
Control Lazy Load, Infinite Scroll and Animations in React
Control Lazy Load, Infinite Scroll and Animations in React
Blessing Ene Anyebe
Building a Research Assistant Tool with AI and JavaScript
Building a Research Assistant Tool with AI and JavaScript
Mahmud Adeleye
Understanding React useEffect
Understanding React useEffect
Dianne Pena
Web Design Trends to Watch in 2024
Web Design Trends to Watch in 2024
Juliet Ofoegbu
Building a 3D Card Flip Animation with CSS Houdini
Building a 3D Card Flip Animation with CSS Houdini
Fred Zugs
How to Use ChatGPT in an Unavailable Country
How to Use ChatGPT in an Unavailable Country
Dianne Pena
An Introduction to Node.js Multithreading
An Introduction to Node.js Multithreading
Craig Buckler
How to Boost WordPress Security and Protect Your SEO Ranking
How to Boost WordPress Security and Protect Your SEO Ranking
Jaya Iyer
Understanding How ChatGPT Maintains Context
Understanding How ChatGPT Maintains Context
Dianne Pena
Building Interactive Data Visualizations with D3.js and React
Building Interactive Data Visualizations with D3.js and React
Oluwabusayo Jacobs
JavaScript vs Python: Which One Should You Learn First?
JavaScript vs Python: Which One Should You Learn First?
Olivia GibsonDarren Jones
13 Best Books, Courses and Communities for Learning React
13 Best Books, Courses and Communities for Learning React
Zain Zaidi
5 jQuery.each() Function Examples
5 jQuery.each() Function Examples
Florian RapplJames Hibbard
Implementing User Authentication in React Apps with Appwrite
Implementing User Authentication in React Apps with Appwrite
Yemi Ojedapo
AI-Powered Search Engine With Milvus Vector Database on Vultr
AI-Powered Search Engine With Milvus Vector Database on Vultr
Vultr
Understanding Signals in Django
Understanding Signals in Django
Kabaki Antony
Why React Icons May Be the Only Icon Library You Need
Why React Icons May Be the Only Icon Library You Need
Zain Zaidi
View Transitions in Astro
View Transitions in Astro
Tamas Piros
Getting Started with Content Collections in Astro
Getting Started with Content Collections in Astro
Tamas Piros
What Does the Java Virtual Machine Do All Day?
What Does the Java Virtual Machine Do All Day?
Peter Kessler
Become a Freelance Web Developer on Fiverr: Ultimate Guide
Become a Freelance Web Developer on Fiverr: Ultimate Guide
Mayank Singh
Layouts in Astro
Layouts in Astro
Tamas Piros
.NET 8: Blazor Render Modes Explained
.NET 8: Blazor Render Modes Explained
Peter De Tender
Mastering Node CSV
Mastering Node CSV
Dianne Pena
A Beginner’s Guide to SvelteKit
A Beginner’s Guide to SvelteKit
Erik KückelheimSimon Holthausen
Brighten Up Your Astro Site with KwesForms and Rive
Brighten Up Your Astro Site with KwesForms and Rive
Paul Scanlon
Which Programming Language Should I Learn First in 2024?
Which Programming Language Should I Learn First in 2024?
Joel Falconer
Managing PHP Versions with Laravel Herd
Managing PHP Versions with Laravel Herd
Dianne Pena
Accelerating the Cloud: The Final Steps
Accelerating the Cloud: The Final Steps
Dave Neary
An Alphebetized List of MIME Types
An Alphebetized List of MIME Types
Dianne Pena
The Best PHP Frameworks for 2024
The Best PHP Frameworks for 2024
Claudio Ribeiro
11 Best WordPress Themes for Developers & Designers in 2024
11 Best WordPress Themes for Developers & Designers in 2024
SitePoint Sponsors
Top 10 Best WordPress AI Plugins of 2024
Top 10 Best WordPress AI Plugins of 2024
Dianne Pena
20+ Tools for Node.js Development in 2024
20+ Tools for Node.js Development in 2024
Dianne Pena
The Best Figma Plugins to Enhance Your Design Workflow in 2024
The Best Figma Plugins to Enhance Your Design Workflow in 2024
Dianne Pena
Harnessing the Power of Zenserp for Advanced Search Engine Parsing
Harnessing the Power of Zenserp for Advanced Search Engine Parsing
Christopher Collins
Build Your Own AI Tools in Python Using the OpenAI API
Build Your Own AI Tools in Python Using the OpenAI API
Zain Zaidi
The Best React Chart Libraries for Data Visualization in 2024
The Best React Chart Libraries for Data Visualization in 2024
Dianne Pena
7 Free AI Logo Generators to Get Started
7 Free AI Logo Generators to Get Started
Zain Zaidi
Turn Your Vue App into an Offline-ready Progressive Web App
Turn Your Vue App into an Offline-ready Progressive Web App
Imran Alam
Clean Architecture: Theming with Tailwind and CSS Variables
Clean Architecture: Theming with Tailwind and CSS Variables
Emmanuel Onyeyaforo
How to Analyze Large Text Datasets with LangChain and Python
How to Analyze Large Text Datasets with LangChain and Python
Matt Nikonorov
6 Techniques for Conditional Rendering in React, with Examples
6 Techniques for Conditional Rendering in React, with Examples
Yemi Ojedapo
Introducing STRICH: Barcode Scanning for Web Apps
Introducing STRICH: Barcode Scanning for Web Apps
Alex Suzuki
Using Nodemon and Watch in Node.js for Live Restarts
Using Nodemon and Watch in Node.js for Live Restarts
Craig Buckler
Task Automation and Debugging with AI-Powered Tools
Task Automation and Debugging with AI-Powered Tools
Timi Omoyeni
Quick Tip: Understanding React Tooltip
Quick Tip: Understanding React Tooltip
Dianne Pena
12 Outstanding AI Tools that Enhance Efficiency & Productivity
12 Outstanding AI Tools that Enhance Efficiency & Productivity
Ilija Sekulov
React Performance Optimization
React Performance Optimization
Blessing Ene Anyebe
Introducing Chatbots and Large Language Models (LLMs)
Introducing Chatbots and Large Language Models (LLMs)
Timi Omoyeni
Migrate to Ampere on OCI with Heterogeneous Kubernetes Clusters
Migrate to Ampere on OCI with Heterogeneous Kubernetes Clusters
Ampere Computing
Get the freshest news and resources for developers, designers and digital creators in your inbox each week