Elementor Tutorials WordPress

How to Update URLs in Elementor After Domain Change

Introduction

Moving your Elementor site to a new domain? URLs don’t update automatically, which means broken links, missing images, and non-functional buttons across your entire site.

This comprehensive guide shows you exactly how to update all URLs in Elementor after a domain changeโ€”from simple plugin methods to manual database updates.

What you’ll fix:

  • Internal page links
  • Image URLs
  • Button links
  • Menu links
  • CSS background images
  • Popup trigger URLs
  • And everything in between

Estimated time: 15-30 minutes depending on site size


Why URLs Break After Domain Migration

When you change domains (e.g., oldsite.com โ†’ newsite.com), WordPress and Elementor store old URLs in multiple places:

Where Old URLs Hide:

  1. WordPress Settings
    • Site URL
    • Home URL
  2. Database Content
    • Post/page content (wp_posts)
    • Post metadata (wp_postmeta) โ† Elementor data lives here
    • Options table (wp_options)
    • Widget data
  3. Elementor-Specific Areas
    • Widget settings (buttons, images)
    • Custom CSS with background images
    • Template library
    • Popup settings
    • Navigation menus

The Problem: Elementor stores data as serialized PHP arrays. Simple find/replace can break this data structure, corrupting your pages.


Pre-Migration Checklist

Before changing URLs, complete these critical steps:

1. Create Complete Backup

Using UpdraftPlus (Recommended):

  1. Install UpdraftPlus plugin
  2. Go to Settings โ†’ UpdraftPlus Backups
  3. Click “Backup Now”
  4. Check “Include database” and “Include files”
  5. Download backup to your computer

Alternative Methods:

  • Host backup (cPanel, Plesk)
  • BackupBuddy
  • Duplicator

2. Document Current Setup

Create a text file with:

Old Domain: https://oldsite.com
New Domain: https://newsite.com
Old URL patterns:
- http://oldsite.com
- https://oldsite.com
- //oldsite.com (protocol-relative)
- www.oldsite.com (if used)

3. Check for Hardcoded URLs

Places to check manually:

  • Theme functions.php – Any hardcoded domains
  • Custom CSS – Background image URLs
  • Custom JavaScript – API endpoints or AJAX URLs
  • .htaccess – Rewrite rules with old domain

Best for: Most users, safest method, handles Elementor serialized data correctly.

Step-by-Step Process

Step 1: Install Better Search Replace

  1. Go to Plugins โ†’ Add New
  2. Search “Better Search Replace”
  3. Install and activate
  4. Navigate to Tools โ†’ Better Search Replace

Step 2: Update WordPress Core URLs

First, update general WordPress settings:

  1. Go to Settings โ†’ General
  2. Update:
    • WordPress Address (URL): https://newdomain.com
    • Site Address (URL): https://newdomain.com
  3. Save changes

Step 3: Run URL Replacement

In Better Search Replace:

Search for: http://oldsite.com Replace with: https://newsite.com

Select Tables:

โ˜‘ wp_posts
โ˜‘ wp_postmeta (CRITICAL for Elementor)
โ˜‘ wp_options
โ˜‘ wp_comments
โ˜‘ wp_commentmeta
โ˜‘ wp_term_taxonomy
โ˜‘ wp_termmeta
โ˜‘ wp_usermeta

โš ๏ธ IMPORTANT: Check “Run as dry run?” first!

Step 4: Review Dry Run Results

  1. Click “Run Search/Replace”
  2. Check results:wp_posts: 47 changes wp_postmeta: 312 changes (Elementor data) wp_options: 23 changes Total: 382 changes
  3. If numbers look reasonable, proceed

Step 5: Execute Real Replacement

  1. Uncheck “Run as dry run?”
  2. Click “Run Search/Replace” again
  3. Note the actual changes made

Step 6: Repeat for URL Variations

Run additional replacements for:

Replace #2: HTTPS to HTTPS (if old site was HTTP)

Search: http://oldsite.com
Replace: https://newsite.com

Replace #3: Protocol-relative URLs

Search: //oldsite.com
Replace: //newsite.com

Replace #4: WWW variation (if applicable)

Search: www.oldsite.com
Replace: www.newsite.com

Replace #5: URL-encoded versions

Search: http:\/\/oldsite.com
Replace: https:\/\/newsite.com

Method 2: Using WP Migrate DB Plugin

Best for: Migrations, handles serialized data perfectly, more powerful than Better Search Replace.

Installation and Setup

Step 1: Install WP Migrate DB

  1. Go to Plugins โ†’ Add New
  2. Search “WP Migrate DB”
  3. Install and activate
  4. Go to Tools โ†’ Migrate DB

Step 2: Configure Find & Replace

In the “Find & Replace” tab:

Find: https://oldsite.com Replace: https://newsite.com

Click “+ Add Row” for additional patterns:

  • http://oldsite.com โ†’ https://newsite.com
  • //oldsite.com โ†’ //newsite.com

Step 3: Select Tables

Choose “Migrate only selected data” or “All tables”

For Elementor, ensure these are selected:

  • wp_posts
  • wp_postmeta
  • wp_options

Step 4: Choose Action

Select “Find & Replace” (not export)

Step 5: Execute

  1. Click “Find & Replace”
  2. Review report showing changes
  3. Click “Close”

Method 3: WP-CLI (Command Line – Advanced)

Best for: Developers, very large sites, automated deployments.

Prerequisites

  • SSH access to server
  • WP-CLI installed
  • Basic command line knowledge

Basic URL Replacement

Step 1: Connect via SSH

ssh username@yourserver.com
cd /path/to/wordpress

Step 2: Create Backup

wp db export backup-before-urls.sql

Step 3: Test with Dry Run

wp search-replace 'https://oldsite.com' 'https://newsite.com' --dry-run

Review output:

Success: 437 replacements to be made.

Step 4: Execute Replacement

wp search-replace 'https://oldsite.com' 'https://newsite.com' --skip-columns=guid

Step 5: Additional Variations

# HTTP version
wp search-replace 'http://oldsite.com' 'https://newsite.com' --skip-columns=guid

# Protocol-relative
wp search-replace '//oldsite.com' '//newsite.com' --skip-columns=guid

Advanced WP-CLI Options

Target specific tables:

wp search-replace 'oldsite.com' 'newsite.com' wp_postmeta wp_posts --skip-columns=guid

Export database after changes:

wp db export backup-after-urls.sql

Check for remaining old URLs:

wp db search 'oldsite.com' --all-tables

Method 4: Manual Database Update (Last Resort)

โš ๏ธ WARNING: Only use if other methods fail. High risk of breaking serialized data.

Using phpMyAdmin

Step 1: Access phpMyAdmin

  1. Login to cPanel or host control panel
  2. Navigate to phpMyAdmin
  3. Select your WordPress database

Step 2: Export Backup

  1. Click “Export” tab
  2. Select “Quick” export method
  3. Format: SQL
  4. Click “Go”
  5. Save file to computer

Step 3: Run SQL Query

Go to “SQL” tab and run:

-- Update post content
UPDATE wp_posts
SET post_content = REPLACE(post_content, 'https://oldsite.com', 'https://newsite.com');

-- Update post metadata (Elementor data)
UPDATE wp_postmeta
SET meta_value = REPLACE(meta_value, 'https://oldsite.com', 'https://newsite.com');

-- Update options
UPDATE wp_options
SET option_value = REPLACE(option_value, 'https://oldsite.com', 'https://newsite.com')
WHERE option_name NOT IN ('siteurl', 'home');

-- Update GUIDs (optional, debatable)
UPDATE wp_posts
SET guid = REPLACE(guid, 'https://oldsite.com', 'https://newsite.com');

Step 4: Verify Changes

Run search query:

SELECT * FROM wp_posts WHERE post_content LIKE '%oldsite.com%' LIMIT 10;

Post-Migration Cleanup

After URL replacement, complete these essential steps:

1. Regenerate Elementor CSS

Why: Elementor caches CSS files with old URLs

How:

  1. Go to Elementor โ†’ Tools
  2. Click “Regenerate CSS & Data”
  3. Wait for confirmation

2. Clear All Caches

Plugin Cache:

  • WP Rocket: Settings โ†’ Clear cache
  • W3 Total Cache: Performance โ†’ Dashboard โ†’ Empty all caches
  • WP Super Cache: Settings โ†’ Delete cache

Server Cache:

  • Check with hosting provider
  • cPanel: Clear OPcache, Memcached, Redis

CDN Cache:

  • Cloudflare: Purge everything
  • StackPath: Clear cache
  • Other: Check CDN documentation

3. Regenerate Thumbnails

Why: Image URLs may still reference old domain

How:

  1. Install “Regenerate Thumbnails” plugin
  2. Go to Tools โ†’ Regenerate Thumbnails
  3. Click “Regenerate All Thumbnails”
  1. Go to Settings โ†’ Permalinks
  2. Don’t change anything
  3. Just click “Save Changes” (flushes rewrite rules)

5. Test Navigation Menus

  1. Go to Appearance โ†’ Menus
  2. Check all menu items point to new domain
  3. Update any hardcoded URLs

6. Check Elementor Templates

  1. Go to Elementor โ†’ Templates
  2. Edit each template
  3. Check links and images
  4. Update template

Verification Checklist

After migration, verify everything works:

Frontend Checks

โ˜ Homepage loads correctly
โ˜ All images display properly
โ˜ Internal links work (click 5-10 random links)
โ˜ Buttons navigate to correct pages
โ˜ Forms submit successfully
โ˜ Videos play (if embedded)
โ˜ Sliders/carousels function
โ˜ Mobile menu works
โ˜ Footer links correct
โ˜ Search functionality works

Elementor-Specific Checks

โ˜ Edit a page with Elementor (no errors)
โ˜ Check background images in sections
โ˜ Verify button links in widgets
โ˜ Test popups (if using Elementor Pro)
โ˜ Check mega menu links (if using Elementor Pro)
โ˜ Verify WooCommerce products (if applicable)
โ˜ Test contact forms
โ˜ Check social media links

Technical Checks

โ˜ No console errors (F12 โ†’ Console)
โ˜ No mixed content warnings (HTTP/HTTPS)
โ˜ SSL certificate installed and working
โ˜ Redirects working (old domain โ†’ new domain)
โ˜ Sitemap generated with new URLs
โ˜ Google Search Console verified for new domain

Troubleshooting Common Issues

Issue 1: Some Images Still Show Old URL

Symptoms: Random images broken, some pages fine

Causes:

  1. Images in custom CSS
  2. Background images in Elementor sections
  3. CDN still serving old URLs

Solutions:

For Custom CSS:

  1. Go to Appearance โ†’ Customize โ†’ Additional CSS
  2. Find/replace old domain
  3. Save

For Elementor Backgrounds:

  1. Edit page with Elementor
  2. Click section with background image
  3. Re-upload or select image from media library
  4. Update

For CDN:

  1. Purge CDN cache completely
  2. Wait 10-15 minutes for propagation
  3. Test again

Issue 2: Elementor Editor Won’t Load

Symptoms: “Loading” spinner never stops, white screen

Causes:

  1. Corrupted serialized data
  2. Wrong site URL in settings
  3. Cache not cleared

Solutions:

Check WordPress URLs:

SELECT option_value FROM wp_options WHERE option_name IN ('siteurl', 'home');

Should show new domain.

Fix if wrong:

UPDATE wp_options SET option_value = 'https://newdomain.com' WHERE option_name = 'siteurl';
UPDATE wp_options SET option_value = 'https://newdomain.com' WHERE option_name = 'home';

Clear Elementor Cache:

  1. Deactivate Elementor
  2. Activate Elementor
  3. Go to Tools โ†’ Regenerate CSS

Symptoms: Clicking links redirects to old site

Cause: Didn’t update all URL variations

Solution:

Run additional replacements:

http://oldsite.com โ†’ https://newsite.com
https://www.oldsite.com โ†’ https://newsite.com
www.oldsite.com โ†’ newsite.com
oldsite.com (no protocol) โ†’ newsite.com

Issue 4: Mixed Content Warnings

Symptoms: Padlock icon missing, “Not secure” warning

Cause: Some resources loaded via HTTP instead of HTTPS

Solutions:

Find mixed content:

  1. Open site in Chrome
  2. Press F12 โ†’ Console
  3. Look for “Mixed Content” warnings
  4. Note the URLs

Fix with plugin: Install “Really Simple SSL” plugin (fixes most cases automatically)

Or run manual replace:

http://newsite.com โ†’ https://newsite.com

Advanced Scenarios

Scenario 1: Subdomain to Main Domain

Example: blog.oldsite.com โ†’ newsite.com

Replacements needed:

https://blog.oldsite.com โ†’ https://newsite.com
http://blog.oldsite.com โ†’ https://newsite.com
//blog.oldsite.com โ†’ //newsite.com

Scenario 2: Subfolder to Root

Example: oldsite.com/blog โ†’ newsite.com

Replacements needed:

https://oldsite.com/blog โ†’ https://newsite.com
https://oldsite.com/blog/ โ†’ https://newsite.com/
oldsite.com/blog โ†’ newsite.com

Additional step: Update .htaccess for redirects

Scenario 3: HTTP to HTTPS (Same Domain)

Example: http://mysite.com โ†’ https://mysite.com

Steps:

  1. Install SSL certificate first
  2. Run URL replacement: http://mysite.com โ†’ https://mysite.com
  3. Add redirect in .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Setting Up 301 Redirects

After migration, redirect old domain to new domain:

Method 1: .htaccess (Apache Servers)

Add to top of old site’s .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^oldsite\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.oldsite\.com$
RewriteRule ^(.*)$ https://newsite.com/\ [R=301,L]
</IfModule>

Method 2: Redirection Plugin

  1. Install “Redirection” plugin on OLD site
  2. Go to Tools โ†’ Redirection
  3. Add redirect:
    • Source URL: .* (regex: all URLs)
    • Target URL: https://newsite.com/$1
    • Type: 301 Permanent

Method 3: Cloudflare Page Rules

  1. Login to Cloudflare
  2. Go to Rules โ†’ Page Rules
  3. Add rule:
    • URL: oldsite.com/*
    • Setting: Forwarding URL (301)
    • Destination: https://newsite.com/$1

SEO Considerations

Update Google Search Console

  1. Add new domain property in GSC
  2. Submit new sitemap
  3. Keep old property active for 6 months to monitor redirects

Update Google Analytics

  1. Go to Admin โ†’ Property Settings
  2. Update “Default URL” to new domain
  3. Update tracking code if changed
  • Facebook page URL
  • Twitter profile link
  • LinkedIn company page
  • Instagram bio link
  • Pinterest verification

Inform Google of Domain Change

  1. Verify both old and new domains in Search Console
  2. Use the “Change of Address” tool
  3. Google Help โ†’ Change of Address tool

Maintenance After Migration

Week 1: Daily Checks

  • Monitor error logs
  • Check Analytics for 404s
  • Test critical pages daily
  • Monitor uptime

Month 1: Weekly Checks

  • Review Search Console for crawl errors
  • Check backlink status
  • Monitor rankings
  • Verify redirects working

Month 3: Final Audit

  • Remove 301 redirects from old domain (optional)
  • Archive old site backups
  • Update all third-party services
  • Document migration for future reference

Conclusion

Updating URLs in Elementor after a domain change is straightforward when using the right tools. Better Search Replace and WP Migrate DB handle the complex serialized data safely, preventing corruption.

Key Takeaways:

  1. โœ… Always backup before starting
  2. โœ… Use Better Search Replace or WP Migrate DB
  3. โœ… Test with dry run first
  4. โœ… Update all URL variations (HTTP, HTTPS, www, protocol-relative)
  5. โœ… Clear Elementor cache and all other caches
  6. โœ… Set up 301 redirects from old to new domain
  7. โœ… Update Search Console and Analytics

Recommended Plugin: Better Search Replace (free) handles 95% of cases perfectly.


Frequently Asked Questions

Q: Do I need to update URLs if I’m just moving to HTTPS on the same domain? A: Yes! Update http://yoursite.com to https://yoursite.com using the same process.

Q: Will URL changes affect my Elementor Pro license? A: No, your license is tied to your account, not the domain. Just reactivate with your license key.

Q: Can I use multiple find/replace plugins at once? A: Noโ€”choose one method and stick with it to avoid conflicts.

Q: What if I already changed URLs but pages are broken? A: Restore your backup and follow this guide step-by-step with dry run mode enabled.

Q: Should I update the GUID column in wp_posts? A: Debatable. WordPress documentation says don’t change GUIDs, but for domain changes, updating them is usually fine.

Q: How do I test if all URLs were updated? A: Use WP-CLI: wp db search 'oldsite.com' --all-tables to find any remaining references.


**Need help?** Drop your migration questions in the comments!

Leave a Reply

Your email address will not be published. Required fields are marked *

Wait! Before You Go...

Get exclusive Elementor tips, tutorials, and updates delivered straight to your inbox. Join our community of WordPress enthusiasts!

We respect your privacy. Unsubscribe at any time. Privacy Policy

  • Weekly Elementor tutorials
  • Exclusive tips & tricks
  • No spam, ever