WordPress Website Setup

How to setup a WordPress website with Chisel

1. Create project directory

Create new project directory and change your working directory to it. You can use the following commands on the command line:

mkdir project-name
cd project-name

2. Run Chisel

Run Chisel from the project directory:

chisel create

Insert project name (you can use the default one based on the working directory name), author and select WordPress Website project type. Select supported browsers.

Then continue with WordPress setup as follows:

  • Enter title for the new site: title of your WordPress website
  • Enter URL: the URL at which your WordPress project runs
  • Enter admin user: WordPress admin user, a different name than admin is suggested to increase security
  • Enter admin password: WordPress admin user password
  • Enter admin email

Select optional plugins which should be installed from the list and wait until installation is complete.

After project dependencies are installed and WordPress is downloaded you'll be asked additional questions to configure it (generate wp-config-local.php):

  • Enter the database host: 127.0.0.1
  • Enter the database port: 3306
  • Enter the database name: the project database name
  • Enter the database user: user who can access the database
  • Enter the database password: password for the user

To speedup installation process we recommend using Yarn. Chisel will automatically detect it and run if possible. Otherwise it falls back to default NPM install.

3. Set up virtual host

Alternatively, we recommend setting up wildcard virtual hosts so your project domain works out of box.

If you haven’t set them up, you will have to add project domain to your hosts file

127.0.0.1 project-name.test

Then use automatically generated dev-vhost.conf and add it to the Apache httpd-vhosts.conf file or add

IncludeOptional /path/to/projects/*/dev-vhost.conf

in your Apache configuration to automatically load configuration for multiple projects.

4. Setting up an existing project

If you are joining development of an existing WordPress project which was already set up with Chisel, you don't have to set it up again. Follow these steps:

  1. Clone the repository.
  2. Run npm install or yarn and npm run build.
  3. Run npx chisel-scripts wp-config, it will create the database if necessary and then create wp-config-local.php and generate dev-vhost.conf.
  4. Import DB dump or enable WP Sync DB plugin and use it to import database and files. Check out the wiki page explaining how you can use WP Sync DB plugin to migrate database.