Testing

Add wp-config.php, .gitignore and test our local development environment.


We need to perform a couple of minor configurations before we do our final test.

1. Add wp-config.php

Since we ignored too, send wp-confing.php to GitHub, we don’t have wp-config.php file locally, which is required for WordPress.

The easiest way to do this is to copy/paste the server wp-config.php manually and create a new file inside ~/Dropbox/GitHub/domain the folder. Then replace the database name, user, and password with the local ones.

2. Add local .gitignore

Same as our server, we don’t want to send sensitive files and folders from our local development environment.

To do that, create .gitigonre in ~/Dropbox/GitHub/domain with the following content:

.htaccess
.logs/
db_backups/
wp-config.php
3. Run a local version control test

We need to send changes from our local development environment to GitHub.

To run a quick test, just run the following commands using the Command Prompt:

C:\Users\username\Dropbox\GitHub\domain\> git add .
C:\Users\username\Dropbox\GitHub\domain\> git commit -m "add .gitignore"
C:\Users\username\Dropbox\GitHub\domain\> git push origin main
4. Open WordPress locally and login to WP Admin

Before you open your local development WordPress website, you may need to restart your Apache and MySQL services via the Xampp Control Panel.

Next, just open your favorite browser and open https://wpbp.local and login to WP Admin.

If everything looks exactly like your SiteGround server, you have done everything correctly.