This script offers a modern workflow to manage Wordpress installation and setup very seamsly. Through a user prompt in the command line you can:
- Install the latest version of Wordpress with Composer.
- Setup WP core in a custom directory (site up and running in http://localhost/yoursite).
- Move wp-config.php from WP core directory (https://wordpress.stackexchange.com/questions/58391/is-moving-wp-config-outside-the-web-root-really-beneficial).
- Create DB in your local system (if it doesn't exist).
- Custom wp-content directory, outside WP folder (the script does the needed modifications to wp-config.php file).
- Installation and activation of your prefered plugins (a set of common plugins are predefined).
- WP-SYNC plugin installation, to manage your DB through differents enviroments.
In 2 minutes, you will have a fresh Wordpress installation, with a lot of security and performance tweaks, plugins and more.
It manages Wordpress installation with Composer. Set up is done with WP-CLI and BASH scripting.
WP starting pack is an internal project of Atias Web, a web design and development company. It hasn't been developed from scratch, but by putting together many techinques and methods.
We want to make of it a maintainable and stable alternative for launching fresh and highly top-notch WP install.
Furthermore, we have GIT and Continous Integration in mind, so whoever in the team can build up and recreate the project in any devolopment enviroment.
Before getting started, make sure you have installed, up and running:
- PHP 5.3.2+
- Composer: https://getcomposer.org/.
- WP CLI: https://wp-cli.org/
It has been tested on Mac OS. It should works on Linux systems as well.
1. In terminal, go to the project folder and type (as root, or using sudo):
$ composer install
$ chmod +x wpconfigure.sh
$ ./wpconfigure.sh
- Configure multi-enviroment through the command prompt setup (https://github.com/studio24/wordpress-multi-env-config or similar).
- Generate salt keys in wp-config files.
- Custom underscore Wordpress theme.
- WP core as a GIT submodule.
- Random generate a random WP password (and copy it to clipboard).
- Handle Wordpress download and installation with WP CLI instead of Composer.
"env: mysql: No such file or directory" error: https://stackoverflow.com/questions/44440064/env-mysql-no-such-file-or-directory-after-wp-import#44856936
"Unable to connect to MySQL server": MAMP or local server not running (yeah, this happens) 😅.
Error: Error establishing a database connection. This either means that the username and password information in your
wp-config.php
file is incorrect or we can’t contact the database server atlocalhost
: https://make.wordpress.org/cli/handbook/installing/#using-a-custom-php-binary and wp-cli/wp-cli#2662