Install this script by running git clone https://github.com/manzwebdesigns/wp-install.git
in your webroot.
To prepare for using the script, you may need to modify the ENV_ROOT
variable
at the top of the script to match the http_root of your webserver. You must also install WP-CLI, which
is most easily done by installing composer using this link: https://getcomposer.org/Composer-Setup.exe.
Then use composer global require wp-cli/wp-cli-bundle
to install WP-CLI. If you have an error about
mysql
, you will need to add the xampp/mysql/bin
directory to your PATH variable.
Be sure to have WP-CLI installed. Again, the easiest way is to use composer (composer global require wp-cli/wp-cli-bundle
)
You can use this script by simply running the command sh wp-install
and providing the necessary answers or
by using positional parameters like this wp-install/wp-install.sh <ADMIN_USER> <ADMIN_PASSWORD> <folderName> <databasename> "<sitetitle>"
- Downloads the latest en_US version of WordPress into a predefined folder
- Creates the
wp-config.php
file based on entered database credentials - Installs WordPress based on entered details
- Changes the permalink structure to
/postname/
and flushes the previous setting - Deletes default WordPress posts and pages
- Creates
Home
,About
andContact
pages - Sets
Home
as landing page - Scaffolds an
_s
based Theme and sets it as default - Installs plugins
- Removes default WordPress themes
- Removes default WordPress plugins
- Creates a Main Menu and adds the existing pages to it
- Initialises a git repository for the Theme folder