Background of the issue:
I am trying to migrate our site from a temporary host inforyde.mi-web.online to the production URL inforyde.com. We are using Avada. We export/import the database to the new site, copy all the files, configure wp-config.php to use the new database, and change the URLs for the site.
Symptoms:
WPML detects that the site has changed and asks if I have changed the address. After confirming, WPML cannot connect to the server. Attempting to remove the license to add a new one crashes the WP backend, preventing access to wp-admin unless the WPML folder is removed and APACHE is restarted.
Questions:
Am I migrating right?
How can I solve this?
Here's a brief tutorial on how to use Duplicator: hidden link
This plugin should easily handle the URL-replacing process.
After migration, register WPML on your new site and enter the new key:
Log in to your WPML account >> go to the "Sites" page (https://wpml.org/account/sites/) >> Remove your old site domain >> add your new site >> it will provide you with a new key which you can add to your site in Plugins > Add new > Commercial.
I'm not very keen on using Duplicator, I've tried in the past and have had some problems, but anyway, I think doing it manually like I'm doing is good enough. In fact after migrating WPML is working fine, the only problem is that I have the message at the bottom that this is a development site or something like that, and I cannot remove the old, development license to add a new one.
Even if I'd do it with Duplicator, after migration I'd have already my WPML registered, but with the key corresponding to the development site, so first I would need to unregister it, and at that point is where WP is crashing.
How can just a click on "unregister" takes down the whole WP admin?
WordPress should definitely not break when you try to go to Plugins > Add new > Commercial > and register WPML with the new production key.
Can you enable the WordPress debug log and recreate the issue to see if we are getting an error message so that we can better understand where the error is coming from?
This will allow us to see if any PHP errors are being produced.
To do that, we can edit the wp-config.php file inside our WordPress directory and insert the following lines:
Now, can you try to reproduce the issue once again?
You should then be able to locate the debug log in: /wp-content/debug.log
Paste the content (if any) on a site like pastebin.com and then share the link with us (the URL you are sharing will be visible only to you and us; it will be automatically hidden for anyone else).
Also, one other thing that you can try is to disable all the non-WPML plugins, switch to a WordPress default theme, and then only after that try to register WPML. Maybe there is a compatibility-related issue causing that crash.
Please let me know how things go.
PS: Please note that I won't be working over the weekend, but I will be able to get back to you at the beginning of next week if any replies come over the weekend.