Hello,
I encountered an issue while using LocalWP (version 9.0.5+6706). After cloning a site and changing its domain, some URLs within my WordPress installation were not updated correctly. Specifically, when I cloned a site named ‘v6.6.1 tests validation’ to ‘v6.6.2 tests validation’ and changed the domain from ‘wpdistrib-v661’ to ‘wpdistrib-v662’, the URLs related to the ‘White Label’ plugin did not reflect this change and remained pointing to the old domain.
I manually corrected the issue by running SQL queries to replace the old URLs with the new ones in the database, but I believe this behavior indicates a bug in LocalWP’s cloning or domain-changing process. It seems that certain URLs, especially those stored by plugins, are not being properly updated during the domain change.
Steps to Reproduce:
- Clone a LocalWP site (‘v6.6.1 tests validation’) to a new site (‘v6.6.2 tests validation’).
- Change the domain of the cloned site from ‘wpdistrib-v661’ to ‘wpdistrib-v662’.
- Check the URLs within the ‘White Label’ plugin (or possibly other plugins/extensions).
- Notice that the old URLs are still present, referencing the previous domain (‘wpdistrib-v661’).
Expected Behavior:
All URLs, including those stored by plugins such as ‘White Label’, should be updated to reflect the new domain (‘wpdistrib-v662’) when the site is cloned and the domain is changed.
Workaround:
To fix the issue, I manually ran the following SQL queries to update the URLs in the database.
Please let me know if you need any further information to resolve this issue. I believe improving the domain change functionality would greatly enhance the user experience, especially for those working with custom plugins that store URLs in the database.
Thank you!
Ethan
Bug Summary
Some URLs, particularly from the ‘White Label’ plugin, are not updated when cloning a site and changing the domain in LocalWP. After changing the domain, certain URLs remain pointing to the previous domain.
Steps to Reproduce
- Clone a LocalWP site running WordPress 6.6.1 (e.g., ‘v6.6.1 tests validation’).
- Change the domain of the cloned site from ‘wpdistrib-v661’ to ‘wpdistrib-v662’.
- After the clone and domain change, inspect the URLs in the ‘White Label’ plugin (or other potential plugins).
- Notice that some URLs still reference the old domain (‘wpdistrib-v661’) instead of the new one (‘wpdistrib-v662’).
Environment Info
- Operating System: Windows 11
- LocalWP Version: 9.0.5+6706
- Server Software: Apache 8.3.8
- PHP Version: 8.3.8
- MySQL Version: 8.0.16
- WordPress Version: 6.6.1
Supporting Info
I manually resolved the issue by running SQL queries to replace the old URLs in the database. Here’s an example of the SQL I used:
UPDATE wp_options SET option_value = REPLACE(option_value, 'wpdistrib-v661', 'wpdistrib-v662') WHERE option_value LIKE '%wpdistrib-v661%';
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'wpdistrib-v661', 'wpdistrib-v662') WHERE meta_value LIKE '%wpdistrib-v661%';
UPDATE wp_posts SET guid = REPLACE(guid, 'wpdistrib-v661', 'wpdistrib-v662') WHERE guid LIKE '%wpdistrib-v661%';
UPDATE wp_posts SET post_content = REPLACE(post_content, 'wpdistrib-v661', 'wpdistrib-v662') WHERE post_content LIKE '%wpdistrib-v661%';
Local Log file attached as requested.
With the Local Log file attached to your submission, this should provide enough information for the LocalWP team to investigate the issue.
Let me know if you need further adjustments or help submitting!
local-lightning.log (143.6 KB)