Skype: bluewindlab
Set up Bedrock on LocalWP installation

Bedrock serves as a robust WordPress boilerplate, facilitating the professional organization of a WordPress project. It uses WordPress core functionalities but provides a subdirectory to add all the custom WordPress themes and plugin codes.

The best part of Bedrock is that it uses Composer to install WordPress themes, plugins, and other PHP dependencies. Additionally, you can use a .env file to set custom environmental variables for staging and production sites. This tutorial will give you a detailed idea about how to set up Bedrock in LocalWP.

Set up Bedrock

Step 01: You need a LocalWP WordPress installation. For this tutorial, I have used a fresh WordPress site. You can check the blog post about setting up a WordPress site using LocalWP.

Step 02: Open the site installation folder in Visual Studio Code. Navigate to the root directory of the project.

Step 03: Open the Visual Studio Code terminal and run the following commands.

cd app
composer create-project roots/bedrock

The composer command installs all the required files for Bedrock.

Step 04: Navigate to the conf/nginx folder and open the site.conf.hbs file. We need to change the root value here.

Step 05: From the Visual Studio Code explorer, select the web folder and copy the path.

Next, update the root value like the following screenshot.

Step 06: Copy the .env.example and create a new .env file from it.

Step 07: Update the values like the following example. Save the file.

DB_NAME='local'
DB_USER='root'
DB_PASSWORD='root'
DB_HOST='localhost'
WP_HOME='http://petmatewp.local'

Step 07: Finally, restart the site from local.

Step 08: You can remove the files from the public directory.

Step 09: Now, you should access your site.

The WordPress admin panel URL is a little bit different than the regular WordPress installation. For example,

http://yousite.local/wp/wp-login.php

One thought on “Set up Bedrock on LocalWP installation

  1. Pingback: Install the Sage WordPress theme in LocalWP - Premium WordPress Themes and Plugins By xenioushk

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*

Back To Top