What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Use Git to track the code you maintain for WordPress—typically a custom theme or plugin—then test and deploy it through a workflow your host supports. Git records code history; it does not automatically version WordPress posts, pages, database changes, or uploaded media. Keep those content and data workflows separate from code deployment.
What Git does in a WordPress project
Git is a distributed version-control system: it records changes to files as commits, letting you review and share a project’s code history. A remote repository such as GitHub gives you a shared or off-machine copy, but connecting a repository to GitHub does not by itself deploy anything to a WordPress site. Deployment depends on your host and its supported workflow. The Git user manual describes the core workflow for readers new to Git.
For a WordPress project, the usual cycle is to edit custom code on a local development copy, inspect the changes, stage only the files you intend to include, commit them with a clear message, push to a remote, and test and deploy using your host’s process. WordPress.com outlines this local-to-GitHub-to-site flow in its development guide.
Choose what to put in the repository
Start with the smallest useful scope. If you are building one custom theme or plugin, a repository for that project keeps its history focused. WordPress.com’s GitHub setup guide recommends a repository for each project and places a theme repository inside the theme folder.
#1 Best Overall
| Repository approach | What it tracks | What to plan separately |
|---|---|---|
| One theme or plugin | The files for that custom project; WordPress.com’s example keeps a theme repository in the theme folder. | How the project is installed, activated, tested, and deployed on your host. |
Broader wp-content code repository |
Selected customizations under wp-content. WordPress.com recommends this scope in its guidance when a broader site-code repository is needed, rather than routinely copying unchanged WordPress core files. |
Explicit exclusions and separate handling for content, database changes, and uploads. WordPress.com Studio’s example excludes mu-plugins, database, db.php, and uploads. |
| Whole-site synchronization | A broader site-sync workflow may include local content or Site Editor changes, depending on the tool. | Whether that workflow suits your host and how it interacts with Git-based code management. WordPress.com describes Studio Sync as an alternative when Git version control is unavailable or unnecessary, and as something that can complement GitHub workflows. |
These are options, not universal rules: the WordPress.com recommendations describe its documented workflow. Another host or architecture may call for a different repository layout. Avoid tracking WordPress core merely by default; if your team deliberately manages core or a full-site build in Git, document that decision and its deployment implications.
Keep configuration, uploads, and content out of code history unless deliberately managed
Protect wp-config.php and credentials
wp-config.php contains essential site configuration, including database connection information. Do not expose live credentials in a repository shared with others or made public. WordPress.com calls out this file as an exception in its setup guidance. The right way to supply environment-specific settings depends on your host, so use its documented configuration mechanism rather than assuming one recipe works everywhere.
Rank #2
Use .gitignore deliberately
A .gitignore file tells Git which intentionally untracked paths to leave out. Add a shared ignore file to the repository when collaborators should inherit the same exclusions; personal exclusions can instead live in repository-local or user-level ignore files. The Git ignore documentation explains the available locations and behavior.
Recommended Free Tools
An ignore rule does not remove a file already tracked by Git. If a file has previously been committed, remove it from the index before the new rule can keep it out of future commits. Review the repository’s status and history before pushing, especially after adding an ignore rule for configuration or generated files.
Handle database content and media separately
WordPress stores posts, pages, settings, and other site data in a database, while uploaded images and other media are files. A code repository that excludes database data and uploads will not carry that content to production when you deploy code. WordPress.com’s Studio example excludes database and uploads; that is specific to its described workflow, but it makes the distinction clear: code deployment is not content or media migration.
Decide independently how database changes, posts and pages, and uploads move between development, staging, and production. Git can record changes to tracked project files; it is not a complete backup or automatic version history for a database-backed WordPress site.
Set up a local development and testing workflow
Make and test changes away from the live site before deployment. The WordPress Theme Handbook recommends using a development environment for theme work and testing; its tools and setup guide covers that principle. WordPress Studio is one documented local workflow, but the specific environment should fit your system and host.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall- Choose the project scope. Decide whether the repository is for one theme, one plugin, or selected broader site code. List files that must remain out of it, especially credentials and environment-specific configuration.
- Create or clone the repository. Start within the custom project folder if you are tracking a theme or plugin. Add a shared
.gitignoreif teammates should use the same exclusions. - Make a small code change locally. Work on a local development copy rather than experimenting on the live site.
- Inspect and stage intentionally. Review changed files and stage only the files that belong in the commit. Check that secrets, uploads, database exports, and unrelated generated files are not included.
- Commit and push. Create a commit with a message that describes the change, then push it to the remote repository if you use one.
- Test before release. Verify the change in the local environment and, when available, a staging site. Git does not create either environment for you.
- Deploy using the host’s supported method. Confirm the target site and deployment trigger before sending changes to production. Migrate any required content, database changes, or media through a separate process.
Deploying from GitHub: what WordPress.com supports
WordPress.com documents a GitHub Deployments feature for connecting a repository containing a plugin, theme, or site to a staging or production site. This is a WordPress.com-specific feature, not a general capability guaranteed by every WordPress host. Its deployment documentation says the first deployment must be triggered, either automatically or manually. A synced theme or plugin may also need activation in wp-admin.
Best Value
| Deployment mode | How it works on WordPress.com | Documented use |
|---|---|---|
| Manual | You trigger a deployment through the dashboard; the first deployment must also be triggered. | WordPress.com recommends manual deployments for production sites. |
| Automatic | After the initial deployment, later changes to the main branch are sent to the connected site automatically. | WordPress.com recommends automatic deployments for staging sites. |
WordPress.com’s guidance states: “For convenience and maximum control over your production site, we recommend setting up: Manual deployments for production sites. Automatic deployments for staging sites.” Follow that as platform-specific guidance, not a rule for hosts with different deployment systems.
WordPress.com currently lists GitHub deployments, WP-CLI access, and staging features as requiring a Business or Commerce plan. Plan features can change; check the current plan guidance before relying on availability.
Choose Git, Studio Sync, or both
Git is a good fit when you want a reviewable history for custom code and a deliberate release process. WordPress.com describes Studio Sync as an alternative when Git version control is not available or not required, and as a way to sync an entire site or local content and Site Editor changes. It can also complement a GitHub workflow—for example, Git for theme or plugin code and a separate sync or migration process for content. The right choice depends on what you need to move and what your host supports.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

