Hello all. A friend's little café in Tbilisi has a WordPress site, and the plan is for me to help with updates and the odd change. I'd rather not test things on the live site. How do people usually set up a staging copy and backups for something this small? Ideally without paying for a big managed host.
კითხვაStaging and backups for a small WordPress site without breaking the live one
Following! Same question really, plus: is a backup plugin enough, or do people do it on the server too?
If the host gives you SSH, WP-CLI makes this quite tidy.
Backup on the live site:
wp db export ~/backups/db-$(date +%F).sql tar -czf ~/backups/content-$(date +%F).tar.gz wp-content
Staging on a subdomain: copy the files, import the database, then fix the URLs:
wp db import ~/backups/db-2026-09-25.sql wp search-replace 'https://example.ge' 'https://staging.example.ge' --skip-columns=guid wp option update blog_public 0
search-replace handles serialized data correctly, which a plain SQL replace does not. blog_public 0 asks search engines not to index the copy.
>>2 A plugin is fine as long as the copies leave the server (cloud storage or similar). A backup sitting next to the site disappears together with it.
Brilliant, thank you. One thing I'm unsure about: they'd like a caching plugin for speed. Is that something to try on staging first, or is it harmless?
>>4
Staging first, definitely. Page caching is usually the part that surprises people: pages for logged-in users, the cart, the booking or contact form must not be cached, or one visitor can see another's data or a stale form token. Good plugins exclude these by default, but it's worth checking each form after enabling it.
Also, don't stack two caching plugins, and clear the cache after every update.
Small addition: put the staging site behind a password (basic auth on the server). The "discourage search engines" option is only a request to robots, and you do not want a copy of the site with test orders visible to everyone.
წერა შეუძლიათ მხოლოდ შესულ წევრებს. შესვლა