wp-forge/wp-site

Create a new WordPress site via Composer.

Installs: 64

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 2

Forks: 2

Open Issues: 0

Type:project

1.0 2020-04-18 18:08 UTC

This package is auto-updated.

Last update: 2024-11-19 03:52:56 UTC


README

Easily create a new Composer-based WordPress site.

Requirements

Installation

Run this command in the terminal:

composer --remove-vcs create-project wp-forge/wp-site

Optionally append a directory name to the end of the command to customize the folder name that your project will be installed into.

The installation process will check your environment for the required PHP version and PHP extensions. If this presents a problem and you want to force install anyway, just add the --ignore-platform-reqs flag to the command.

Usage

With Laravel Valet

  • Install Homebrew
  • Install Laravel Valet
  • Install MySQL using Homebrew: brew install mysql
  • Start MySQL using Homebrew: brew services start mysql
  • Set password to be root for the root user: $(brew --prefix mysql)/bin/mysqladmin -u root password root
  • Run composer create-project wp-forge/wp-site local
  • Run valet link local (unless you've already run valet park and are in your Valet root directory)
  • Run valet secure local
  • Run cd local
  • Run composer run wp db create - You may need to rename the database in your .env file first if you don't want your database to be named local.
  • Visit https://local.test (unless you set a different top level domain) in the browser to finish the WordPress installation.

If you want your site's domain to be something different, just replace all instances of the word local above with your desired name.

With Local

  • Install Local
  • Create a new WordPress site using the UI
  • Navigate to the site's app directory in the terminal.
  • Run rm -rf public to delete the public directory.
  • Run composer create-project wp-forge/wp-site public
  • Click the link in Local to visit the site in the browser.

Configuration

Open up the .env file to edit database credentials or other WordPress constants.

Reminders

Don't forget to:

  • Update the project's meta data in the composer.json file.
  • Customize the readme.md file for your project.