Skip to content

Latest commit

 

History

History
57 lines (55 loc) · 2.77 KB

installation.md

File metadata and controls

57 lines (55 loc) · 2.77 KB

Using the boilerplate to create your project

  1. Clone this repository.
git clone https://github.com/ColoredCow/wordpress-init.git
  1. 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
  1. Change the theme name from ColoredCow to your_project_name. Theme folder can be found inside /public/wp-content/themes/
  2. Update .gitignore with the new theme name (your_project_name).
  3. Push the code to your GitHub project repo
  4. On your local machine, install composer in the root directory using the CLI.
composer install
  1. Run npm install in /public/wp-content/themes/your_project_name/ directory.

  2. Run grunt to check if the grunt installation worked. You should see a style.css and main.js inside your theme.

  3. Secure your WordPress installation.

    • Make a copy of wp-sample-config.php in wordpress-init/public/ directory and name it as wp-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);
  4. 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

    1. WAMP

      • If you prefer using WAMP, you can set up virtual host by following steps mentioned on this link.
    2. XAMPP

      • If you prefer using XAMPP, you can set up virtual host by following steps mentioned on this link.
  5. 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.