How Do I Export My WordPress Site to GitHub?

If you are looking to export your WordPress site to GitHub, there are a few different ways you can go about it. The most straightforward way is to use the built-in WordPress export tool.

To do this, first go to your WordPress site’s root directory (where all the files are located) and then click on the export button located in the main admin area.

Once the export is complete, you will be presented with a file called wp-export-20160525-12.txt.

This file should be saved to a location that you can access easily. Next, you will need to open up a terminal (Mac/Windows) or a command prompt (Linux) and navigate to the saved file. Once you are there, you will need to use the following command to export the site:.

wp export — to = “GitHub repo name”

For example, if you wanted to export your WordPress site to the my-site-on-github repository, you would use the following command:

wp export — to = “my-site-on-github”

Once the export is complete, you will be prompted to enter a few information about the site. This includes the name of the repository, the username for the repository, and the password for the repository.

Once you have entered these details, the site will be exported and stored in the repository.

Conclusion

exporting a WordPress site to GitHub is a straightforward process that can be completed with a few simple commands.