# Staging and production

> A common setup: you work on a staging copy, then publish to production.

Source: https://uglydev.com/docs/updating-and-moving/staging-and-production/
Updated: 19 November 2026

| Step | Staging | Production |
| --- | --- | --- |
| 1 | Build or change the groups |  |
| 2 | Commit the theme with its `ugly-json/` files |  |
| 3 |  | Deploy the theme (`git pull`) |
| 4 |  | `wp ugly-fields check` Pro, or **Settings → Tools → Check the JSON files** |
| 5 |  | **Sync (n)** in the admin, or `wp ugly-fields sync` Pro |

Why this order is safe:

- The files travel with the theme, like any other code.
- Production never changes by itself: you press **Sync** when you are ready.
- A broken file is found by `check` **before** it can do anything.

A full example, with a deploy script, is in [Tutorial 4](https://uglydev.com/recipes/).
