In this blog, we will learn about how to set up chassis for WordPress development.

- Install the prerequiste software.
- Install Vagrant Hostsupdater plugin
vagrant plugin install vagrant-hostsupdater. - Clone Chassis into a new directory
git clone --recursive https://github.com/Chassis/Chassis project-name. cd project-name.cp local-config-sample.php local-config.php– This file is used for local environment constants.touch config.local.yaml.- Copy and paste the following into
config.local.yaml:
hosts:
- project-name.local
ip: 192.168.33.10
hostsupdater: yes
# Should we use multisite?
# (Set to Yes for subdirectories)
# Values: No, Yes, subdomains
multisite: subdomains
extensions:
- chassis/sequelpro
- chassis/xdebug
- chassis/mailhog
- chassis/phpmyadmin
git clone git@xyz.git contentvagrant up- Open http://project-name.local/wp/wp-admin/ in a browser.
- Login using Username:
adminand Password:password.
Note:
In case your themes and plugins are not inside the root of`content`, but inside content/wp-content, then be sure to add that path in `local-config-db.php` like so :
defined( 'WP_CONTENT_DIR' ) or define( 'WP_CONTENT_DIR', '/vagrant/content/wp-content' );
and also in the root file wp-config.php like so:
defined('WP_CONTENT_URL') or define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/content/wp-content' );
Migrating Database.
- Assuming that you have the MySQL database dump and uploads folder.
- Copy the database file ( e.g. wordpress-2021–07–05-bb823aa.sql ) into your
contentfolder. vagrant sshcd /vagrant/contentwp db resetwp db import wordpress-2021-07-05-bb823aa.sqlwp user create yourusername youremail --role=administrator# will generate a password- Replace your uploads folder from
contentwith new one.
PHPMyadmin
- Open http://project-name.local/phpmyadmin/ in a browser.

Leave a Reply