- Clone this repository.
git clone https://github.com/ColoredCow/wordpress-init.git
- Change remote URL to your project GitHub URL using the following command.
git remote set-url origin https://github.com/user_name/project_name
git remote -v # will output the project github url if above command ran successfully
- Change the theme name from ColoredCow to your_project_name. Theme folder can be found inside /public/wp-content/themes/
- Update .gitignore with the new theme name (your_project_name).
- Push the code to your GitHub project repo
- On your local machine, install composer in the root directory using the CLI.
composer install
-
Run
npm install
in /public/wp-content/themes/your_project_name/ directory. -
Run
grunt
to check if the grunt installation worked. You should see a style.css and main.js inside your theme. -
Secure your WordPress installation.
- Make a copy of
wp-sample-config.php
in wordpress-init/public/ directory and name it aswp-config.php
. - Generate a new set of auth keys. Generate
- Replace the auth key code in
wp-config.php
with newly generated set of auth keys.define('AUTH_KEY', ''); define('SECURE_AUTH_KEY', ''); define('LOGGED_IN_KEY', ''); define('NONCE_KEY', ''); define('AUTH_SALT', ''); define('SECURE_AUTH_SALT', ''); define('LOGGED_IN_SALT', ''); define('NONCE_SALT', '');
- Change the table prefix as you need in wp-config.php.
- Set the Debug Mode to true for your development environment.
define('WP_DEBUG', true);
- Make a copy of
-
Create a Virtual host for your project. The virtual host should point to /path_to_project_directory/public : The virtual host should point to /path_to_project_directory/public
-
Configure the database.
- Create a new database for your project with MySql.
- Update configurations for newly created database in public/wp-config.php.
define('DB_NAME', ''); define('DB_USER', ''); define('DB_PASSWORD', ''); define('DB_HOST', ''); define('DB_CHARSET', 'utf8');
- All geared up for the famous 5 minute install.