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:
- WordPress Settings
- Site URL
- Home URL
- Database Content
- Post/page content (
wp_posts) - Post metadata (
wp_postmeta) โ Elementor data lives here - Options table (
wp_options) - Widget data
- Post/page content (
- 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):
- Install UpdraftPlus plugin
- Go to
Settings โ UpdraftPlus Backups - Click “Backup Now”
- Check “Include database” and “Include files”
- 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
Method 1: Using Better Search Replace Plugin (Recommended)
Best for: Most users, safest method, handles Elementor serialized data correctly.
Step-by-Step Process
Step 1: Install Better Search Replace
- Go to
Plugins โ Add New - Search “Better Search Replace”
- Install and activate
- Navigate to
Tools โ Better Search Replace
Step 2: Update WordPress Core URLs
First, update general WordPress settings:
- Go to
Settings โ General - Update:
- WordPress Address (URL):
https://newdomain.com - Site Address (URL):
https://newdomain.com
- WordPress Address (URL):
- 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
- Click “Run Search/Replace”
- Check results:
wp_posts: 47 changes wp_postmeta: 312 changes (Elementor data) wp_options: 23 changes Total: 382 changes - If numbers look reasonable, proceed
Step 5: Execute Real Replacement
- Uncheck “Run as dry run?”
- Click “Run Search/Replace” again
- 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
- Go to
Plugins โ Add New - Search “WP Migrate DB”
- Install and activate
- 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_postswp_postmetawp_options
Step 4: Choose Action
Select “Find & Replace” (not export)
Step 5: Execute
- Click “Find & Replace”
- Review report showing changes
- 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
- Login to cPanel or host control panel
- Navigate to phpMyAdmin
- Select your WordPress database
Step 2: Export Backup
- Click “Export” tab
- Select “Quick” export method
- Format: SQL
- Click “Go”
- 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:
- Go to
Elementor โ Tools - Click “Regenerate CSS & Data”
- 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:
- Install “Regenerate Thumbnails” plugin
- Go to
Tools โ Regenerate Thumbnails - Click “Regenerate All Thumbnails”
4. Update Permalink Structure
- Go to
Settings โ Permalinks - Don’t change anything
- Just click “Save Changes” (flushes rewrite rules)
5. Test Navigation Menus
- Go to
Appearance โ Menus - Check all menu items point to new domain
- Update any hardcoded URLs
6. Check Elementor Templates
- Go to
Elementor โ Templates - Edit each template
- Check links and images
- 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:
- Images in custom CSS
- Background images in Elementor sections
- CDN still serving old URLs
Solutions:
For Custom CSS:
- Go to
Appearance โ Customize โ Additional CSS - Find/replace old domain
- Save
For Elementor Backgrounds:
- Edit page with Elementor
- Click section with background image
- Re-upload or select image from media library
- Update
For CDN:
- Purge CDN cache completely
- Wait 10-15 minutes for propagation
- Test again
Issue 2: Elementor Editor Won’t Load
Symptoms: “Loading” spinner never stops, white screen
Causes:
- Corrupted serialized data
- Wrong site URL in settings
- 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:
- Deactivate Elementor
- Activate Elementor
- Go to Tools โ Regenerate CSS
Issue 3: Links Work But Point to Old Domain
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:
- Open site in Chrome
- Press F12 โ Console
- Look for “Mixed Content” warnings
- 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:
- Install SSL certificate first
- Run URL replacement:
http://mysite.comโhttps://mysite.com - 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
- Install “Redirection” plugin on OLD site
- Go to
Tools โ Redirection - Add redirect:
- Source URL:
.*(regex: all URLs) - Target URL:
https://newsite.com/$1 - Type: 301 Permanent
- Source URL:
Method 3: Cloudflare Page Rules
- Login to Cloudflare
- Go to Rules โ Page Rules
- Add rule:
- URL:
oldsite.com/* - Setting: Forwarding URL (301)
- Destination:
https://newsite.com/$1
- URL:
SEO Considerations
Update Google Search Console
- Add new domain property in GSC
- Submit new sitemap
- Keep old property active for 6 months to monitor redirects
Update Google Analytics
- Go to Admin โ Property Settings
- Update “Default URL” to new domain
- Update tracking code if changed
Update Social Media Links
- Facebook page URL
- Twitter profile link
- LinkedIn company page
- Instagram bio link
- Pinterest verification
Inform Google of Domain Change
- Verify both old and new domains in Search Console
- Use the “Change of Address” tool
- 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:
- โ Always backup before starting
- โ Use Better Search Replace or WP Migrate DB
- โ Test with dry run first
- โ Update all URL variations (HTTP, HTTPS, www, protocol-relative)
- โ Clear Elementor cache and all other caches
- โ Set up 301 redirects from old to new domain
- โ 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!
