If you move a WordPress site to a new domain (or switch from staging to production) you must update the WordPress site URL correctly. Otherwise you can get redirect loops, a blank page, or mixed‑content warnings.
This guide is written for WordPress websites hosted on GARMTECH Hosting with Plesk and LiteSpeed.
Before you start (recommended)
- Back up the website files and database.
- Make sure the new domain points to your GARMTECH hosting (DNS A/AAAA or nameservers).
- Plan to update links: WordPress stores the domain inside the database.
Step 1 — Add the new domain in Plesk (if needed)
If the new domain is not yet in Plesk:
- Open Plesk for your hosting plan (via My.GARMTECH → your hosting service → Login to Plesk).
- Go to Websites & Domains.
- Add the domain (or a subdomain) so it points to the correct document root.
Step 2 — Install/enable SSL for the new domain
- In Plesk, open the domain.
- Go to SSL/TLS Certificates.
- Issue/renew a Let’s Encrypt certificate for the new domain.
- Enable HTTPS redirection if you want to force HTTPS.
Step 3 — Update WordPress URLs
You need to update both fields:
- WordPress Address (URL)
- Site Address (URL)
Option A (recommended): WordPress Admin
- Sign in to wp-admin on the old domain (or via Plesk WordPress Toolkit).
- Go to Settings → General.
- Update the two URL fields to the new domain (use
https:// if SSL is enabled).
- Save changes. Log in again if WordPress redirects you.
Option B: wp-config.php (if you cannot access wp-admin)
Add these lines to wp-config.php (adjust the domain):
define('WP_HOME', 'https://new-domain.example');
define('WP_SITEURL', 'https://new-domain.example');
Step 4 — Replace old links inside the database
After changing the site URL, posts/images may still contain the old domain. Use one safe method:
- A trusted WordPress plugin for search & replace, or
- WP‑CLI search‑replace (advanced), or
- A database tool that supports serialized data (do not use a plain “find/replace” in SQL for serialized values).
Step 5 — Clear caches
- If you use LiteSpeed Cache (LSCache), purge all cache after the change.
- If you use a CDN (for example, Cloudflare), purge cache there too.
Quick troubleshooting
- Redirect loop → check that WordPress URLs are
https:// and match your SSL settings; clear cache; check “force HTTPS” rules.
- Mixed content → run a search & replace to update old
http://old-domain links to https://new-domain.
- Still opening the old domain → DNS may still be propagating, or the old domain is cached in your browser/CDN.