There are a few ways we can install and serve WordPress:
- By unpacking the downloaded WordPress .zip file and installing it from a directory
- By using the WordPress CLI (https://make.wordpress.org/cli/handbook/ or https://wp-cli.org/)
- By setting up a port using Apache (which can be a bit of pain)
- By using the built-in PHP server
We will use the built-in PHP server in this book as it is the simplest way to get WordPress started and will make it easier to move it around in the future if we need to, as long as it is served on the same port; for example, localhost:4000. So, let's find out how to do this:
- Create a directory (make it writable as well) and download and unzip WordPress in there. You can download WordPress from https://wordpress.org/. You should see some .php files with /wp-admin/, /wp-content/, and /wp-includes/ directories in your unzipped WordPress directory.
- Create a MySQL database (for example...