WordPress in Git: moving a site into a repository
Two ways to put a WordPress site under Git: keep the theme and plugins in a repository, or export the content into a static site. What to commit and how to deploy.
Once a site lives in a GitHub repository, there is no reason to upload it by FTP. Hostinger has built-in Git deployment: the host pulls files from the repository, and a webhook triggers it after every change. Below is a setup that works both for plain sites and for sites that need a build step.
This suits repositories that already contain the files to put on the server (an HTML site, a WordPress theme and so on).
public_html.From now on every push to the selected branch updates the site.
If the site is built by a generator (Next.js, Astro, Hugo and others), the server should receive the build output, not the source folder. A convenient setup:
deploy.deploy branch.Sources and built files never mix, and a rollback is simply moving the deploy branch back one commit.
This is the last link in managing a website with an AI agent: the agent makes changes locally, you approve them, a push to the repository — and a minute later the site is updated. That is how this site works too. A ready-made setup is part of agentic website management.
Need help with this?
Local machine → repository → server: you ask, an AI agent changes the site, every change is reviewed, saved and deployed automatically. I set it up and teach your team.
How it works →

Two ways to put a WordPress site under Git: keep the theme and plugins in a repository, or export the content into a static site. What to commit and how to deploy.

How managing a website through an AI coding agent works: what to prepare, the cycle from request to publishing, and which tasks to trust an agent with.

How a 544-page multilingual WordPress site moved into a Git repository run by an AI agent: 9 languages, 541 old URLs kept and automatic deployment.

Contact
An AI agent, an automation, a website improvement or a full rebuild — describe the task in a few lines and I will reply within one business day.
Tallinn, Estonia · working remotely across Europe
The site does not use cookies. Visit statistics are collected without them. Learn more