This guide is for self-hosted WordPress — the WordPress.org install you run on your own hosting plan. A WordPress.com site changes its address from the hosting dashboard instead, which is a different flow entirely. The three methods below run from most convenient to most technical, followed by the cleanup that keeps images, links and search rankings intact.
Method 1: Settings → General
WordPress keeps two addresses on the Settings → General screen. WordPress Address (URL) is where the WordPress core files live; Site Address (URL) is what visitors type to reach the site. On most installs the two are identical, both must start with https://, and neither should end with a slash.
Back up the files and the database first — a mistyped address can lock you out of the dashboard, and the backup is your undo button. Then:
- Open Settings → General and locate the two address fields near the top.
- Type the new URL into both fields, exactly —
https://, no trailing slash. - Click Save Changes. The dashboard briefly drops offline because it now lives at the new address.
- Log back in at the new URL (
https://your-new-domain.com/wp-login.php) and open a few pages in a private window to confirm the site serves.
Use this method for planned moves — a new domain or a folder relocation. If the save locks you out, Method 2 recovers the site. DIY moves are also where hosting choice shows: WordPress hosting plans that handle migrations for you rarely need this edit at all.
Method 2: wp-config.php Defines
When the dashboard is unreachable — a typo in the new URL, or the site is mid-move between servers — fix the addresses at the file level. Open wp-config.php in the site root with your host's File Manager or an FTP client such as FileZilla, and add two lines directly above the /* That's all, stop editing! */ comment: define( 'WP_HOME', 'https://example.com' ); and define( 'WP_SITEURL', 'https://example.com' ); — with your real URL and the same https-and-no-slash rules as Method 1.
These constants override the database values on every page load, so the site comes back immediately. The trade-off: the two fields on the General screen gray out while the lines exist, so future edits happen in the file. Remove the two lines once you are confident and the dashboard fields become editable again.

Method 3: WP-CLI or Better Search Replace
Command-line access makes the change fastest. Over SSH, from the site folder, set both options: wp option update siteurl 'https://example.com' and wp option update home 'https://example.com'. Then swap every old URL saved inside content: wp search-replace 'https://old-domain.com' 'https://example.com' --skip-columns=guid. Keep the --skip-columns=guid flag — the GUID column identifies posts to feed readers and must never be rewritten.
No SSH? Install the free Better Search Replace plugin and run the same old-to-new swap from Tools → Better Search Replace. It handles serialized data correctly — a hand-written SQL REPLACE() across wp_options can corrupt widget and theme settings, which store string lengths alongside values. On a WebJi® plan you can skip all of this: email support@webji.services the old and new addresses and support runs the CLI route during the move.
Fixing Media and Mixed-URL Content
Changing the two addresses does not rewrite links already saved inside posts. Image tags in post_content carry the full old URL, so pictures break the moment the site moves. The search-replace from Method 3 is what repairs them — run it on all tables once the addresses are settled, then load a media-heavy page to confirm.
Three more spots hold old addresses: Appearance → Menus and text widgets with hand-typed links; cached transients in the options table, which some plugins rebuild with the stale value until cleared; and the page, browser and CDN caches — flush them after every change so you are not judging the old site. The WordPress database explained guide maps the wp_options and wp_posts tables if you want to see where each value lives.
Redirects After the Change
What needs redirecting depends on what moved. A folder relocation on the same domain usually needs nothing beyond the address change. A domain change does: every old URL should answer with a 301 redirect to its new equivalent, through an .htaccess catch-all rule ([R=301,L]) or the free Redirection plugin.
Then close the move out: re-save Settings → Permalinks once so WordPress rebuilds its rewrite rules, update the sitemap, and for a full domain change file the Change of Address request in Google Search Console so the index follows. Rankings typically transfer over the following weeks — the 301s are what keep bookmarks, old backlinks and AI-crawled references landing on the right pages in the meantime.
Frequently Asked Questions
How do I change my WordPress site URL?
Settings → General — put the new URL in both WordPress Address (URL) and Site Address (URL) and save. WordPress then serves the site and admin area from the new address; log back in at the new /wp-login.php.
Why is my site broken after changing the domain?
Usually the two fields hold a mistyped URL or point somewhere the files are not, so WordPress bounces in a redirect loop. Fix the values from wp-config.php (WP_HOME and WP_SITEURL) or the siteurl and home rows in wp_options, then clear every cache.
How do I update all URLs in the database?
Run WP-CLI's wp search-replace 'https://old' 'https://new' --skip-columns=guid, or the Better Search Replace plugin if you have no SSH. Both handle serialized data safely; never rewrite the GUID column, which feed readers use.
Can I change the URL without database access?
Yes. The dashboard method needs no database access at all, and wp-config.php needs only file access over FTP or your host's File Manager. Direct database edits are the recovery route when both of those fail.
How do I move WordPress from HTTP to HTTPS or to a new domain?
The same flow: update both address fields to the https:// (or new-domain) version, run a search-replace for links saved inside posts, re-save permalinks and add 301 redirects so old URLs still resolve.
Do I need redirects after changing my URL?
Only when the old URL stops serving the page — a domain change or folder move. Add 301 redirects from old to new via .htaccess or the Redirection plugin, and file the Change of Address request in Google Search Console.
Is WebJi® an Indian company?
Yes. WebJi® is headquartered in Jaipur, Rajasthan and has operated since 2005. Billing, support and governance all run from India.
Do you provide GST invoices?
Every purchase and renewal gets a GST invoice with our GSTIN, and hosting prices are quoted exclusive of 18% GST. Claim input credit as applicable.

