WordPress is designed to have a single canonical site URL. If you want it to work simultaneously with two different URLs, you’ll need to use a plugin or some custom code.
There are some options given here: https://wordpress.stackexchange.com/questions/177703/can-you-run-wordpress-with-multiple-domains-at-the-same-time-not-multisite
If you want to move it from one location to the other, but not work simultaneously on both, here is how: https://ww.wp.xz.cn/documentation/article/changing-the-site-url/
-
This reply was modified 2 years, 9 months ago by
Tellyworth.
@tellyworth Thank you for the reply, but I don’t think the problem is about the site URL, as I used the same in both installations.
On my C: drive which is my original one, I have a portable web server setup that I launched with WordPress just fine. When moving it to my D: drive however, some of the content displays wrong as you can see.
-
This reply was modified 2 years, 9 months ago by
alemoth.
same happened with my website.. helpful for me too thanks
UPDATE
I haven’t found any fix for this issue. I can confirm with certainty that it is in fact a WordPress issue. When changing the directory of the web server, the page layout gets totally messed up. I have tried to rollback versions, but the same issue remains.
I plan to work on my WordPress website when traveling which becomes a problem with an issue like this. I don’t think I can use this service anymore.
-
This reply was modified 2 years, 9 months ago by
alemoth.
This sounds like the issue described in https://core.trac.ww.wp.xz.cn/ticket/59111 to me. Try adding define( 'WP_DEVELOPMENT_MODE', 'core' ); to your wp-config.php file as a temporary workaround while you’re working on the site.
@joemcgill It works. Thank you so much. You’ve saved me so much work.
I wonder why the issue has not been talked about a lot before. Why is it happening? Why does setting DEVELOPMENT_CORE fix the issue?
Glad that fixed your problem! This is a new bug due to an optimization that was shipped in WP 6.3, which is why there isn’t much written about it. Setting that development mode bypasses some internal caching of the path to those style files. Since you were changing directories, the cached path to those files also changed, which is why they weren’t loading.