How Do I Move My WordPress Site to GitHub?

If you are looking to move your WordPress site to GitHub, there are a few things you will need to do first.

1. Open a new terminal window and change to the directory where your WordPress site is located.

2. Use the following command to clone your WordPress site to your local machine:

git clone https://github.com/[your_username]/[your_site_name]

3. Change into the newly cloned directory and use the following command to install the dependencies needed for WordPress:

php composer.phar install

4. Use the following commands to change the directory to where your WordPress files are located:

cd [your_site_name]

5. Use the following command to start the WordPress site:

php wp-config.php

6. Use the following command to add your GitHub account information to the WordPress site:

gedit config.php

7. Use the following command to set the WordPress site as the active document:

gedit src/themes/[your_theme_name]/header.php

8. Use the following command to set the WordPress site as the active document:

gedit src/themes/[your_theme_name]/footer.php

9. Use the following command to commit your changes to GitHub:

git commit -am ‘added GitHub account information to WordPress site’

10. Use the following command to push your changes to GitHub:

git push origin master

Conclusion

In this article, we have explained how to move your WordPress site to GitHub. By following these steps, you will be able to keep your site organized and accessible from any device or computer.