Usually our GitHub repository contains the whole WordPress directory, so you need to do a few steps to install the project at you local environment. Simply follow those steps:
- Clone the project from GitHub repository to your webserver directory, e.g:
/var/www/html/
- Create a local database and DB user and password, if needed
- Open your local project URL, e.g.:
http://localhost/multisite/
or
http://127.0.0.1/multisite/
Where multisite
is the name of your project.
Now you need to see this:
Error establishing a database connection
-
Now it's time to install WordPress
-
Copy wp-config-local-sample.php to wp-config-local.php
-
Open wp-config-local.php and add your local Database detais there.
-
Refresh the page. Not you need to see the WordPress installation screen. Follow the instructions from the screen.
-
Once you have installed WordPress, login to the backend, go to Settings => Permalinks, select "Post name" and save changes.
-
Now you have a new WordPress installation with files from the repository.
-
Install WordPress Multisite.
-
Open wp-config-local.php and remove the comment from
WP_ALLOW_MULTISITE
. Save the file. -
Under Tools Dashboard menu you should have a new menu item - Network Setup.
-
Open the page and follow the instructions.
-
WordPress will suggest you to edit wp-config.php. Open wp-config-local.php instead and edit the file with suggested details. Refresh the page, login again and if everything went well, you'll have your local development environment.