
To set-up themes or plugins for Bedrock, add your theme(s) in ‘web/app/themes/’ and your plugins in the ‘web/app/plugins’ directory. With Bedrock, they are situated inside the ‘web/app’ folder. In a default WordPress installation, the themes and plugins folder are found inside the ‘wp-content’ directory.
#ROOT PATH IN XAMPP INSTALL WORDPRESS HOW TO#
We have so far learned how to install and set-up Bedrock, so let’s see how we can use Bedrock to develop a WordPress project. How to use Bedrock for WordPress development It should redirect you to the famous 5-minute WordPress installation. Restart the Apache server and go to the URL: in your browser. Keep the rest of the document as is, save and close the file. env and add the DB Credentials as constants.Īlso, add the WP_HOME URL & the salt key (You can generate a salt key at ) You can find this file in the root directory of the project. The final step in our setup is to create an empty database for our website and add its credentials in the. If I now run bedrock.local on the browser it will point to the project directory that is associated with the above steps. Note that I passed ‘bedrock.local’ as the local IP address with the same string (‘bedrock.local’) added in the ‘nf’ file and it is mapped to my project directory path. To do this, Right-click on the App icon > Run as administrator.Īdd the following lines to the end of the file. Open C:WindowsSystem32driversetchosts in the Notepad application.īe sure you have opened the Notepad application with administrator access to make this change.
#ROOT PATH IN XAMPP INSTALL WORDPRESS WINDOWS#
Next, we need to make a small change to the Windows system file. “D:/xampp/htdocs/bedrock/web” You can adjust this path as per your XAMPP setup. Here I have entered the directory path of the project – i.e. ĭocumentRoot "D:/xampp/htdocs/bedrock/web" Open nf in your text editor to configure the virtual hosts.Īdd the following to the end of the file. Start with the document root set-up on your OS for the Bedrock project. We are now done with the installation, so let’s go ahead and configure Bedrock. This installs all the dependencies required for the development and adds them inside the vendor folder created on your project’s file system. Next, go to the project directory in the terminal window/command line and install the dependencies using the command: composer install gitignore file with all rules defined already in it. If you jump into your project directory, you will notice a few files such as You can also pass the directory name as follows: composer create-project roots/bedrock DIRECTORY_NAME This command creates a bedrock folder inside the htdocs.

To create the project using Composer, head over to your htdocs directory from the command line and run the following command: composer create-project roots/bedrock

We’ll use Composer to create our project, so make sure it is installed on your system before proceeding. Using a Windows computer with XAMPP already set-up, install Bedrock to begin setting up the WordPress boilerplate for development. When working on other operating systems, the steps to set-up the document root will differ slightly, but everything else should be broadly similar. Throughout this tutorial, I will be using and referring to the Windows OS only. In this blog, we will go through the steps to set-up Bedrock for WordPress development. It works by allowing the user to leverage a modern day development workflow that can help speed up your development process.

Recently however, I found a WordPress boilerplate called ‘Bedrock’ – which was created by the guys from Roots that pleasantly surprised me. Like many other developers, I have started to lose the same level of excitement I used to have when working within its rigid structure, as I found it has restricted form and limited functionality over time. As an experienced PHP Developer, I have more often or not used WordPress when working on my web projects.
