Issue
Elementor does not work after the URL is changed when migrating the website.
Possible cause
Migration can cause the WordPress Address (URL) to be different from the Site Address (URL). This can prevent Elementor from working properly.
Solution
When you change the domain name/URL of your site, you need to replace all references to your old site URL with your new URL. This should be done before using Elementor Tools to edit the Elementor settings.
Change the home and siteurl fields using a DB management program
- After you have copied your site files to your new site, access the files using a MySQL management tool such as phpMyAdmin.
- Locate the wp-options table.Notewp-options is the most common name for this table that contains this information, but the table will always include the work options.
- Locate the home and siteurl options.
- For each option, click the option value field.
- Enter your new domain/URL.
Change the home and site URL with a text editor
Instead of using a MySQL tool, you can manually update the wp-config file.
To update the wp-config file:
- Open the wp-config.php file with a text editor.
This lets you edit the file. - Look for two lines that define home and siteurl (replace myoldurl.com with your previous URL.)
- Replace your previous URL with your new one.
- Save the file.
Search your entire database for instances of the old URL
Most sites contain numerous references to the site’s URL. The best way to replace these references is with a ׳Search and Replace׳ plugin. For more information about installing plugins, see WordPress plugins.
Use Elementor tools to replace Elementor content
If your website is still encountering issues after replacing the URL, you may need to use Elementor tools to update Elementor content. See below to see how to update Elementor content.
- Login to WP Admin.
- Go to Elementor > Tools.
- Click Replace URL.
- Under Update Site Address (URL), enter the old url and new url.
- Click Replace URL.
- Click the General tab.
- Click Clear Files & Data.
- Click Save Changes.NoteThis process only affects Elementor-related pages.
Verify the URLs
Follow the below steps:
- Go to the WordPress Dashboard.
- Click Settings. The General Settings page opens.
- Check WordPress Address (URL) and Site Address (URL). They should be same.