• I’ve recently started self-hosting a WordPress website.
    After changing my web server’s directory (from a drive to another drive), I noticed that it breaks some of the key components. Take a look by yourself.

    ^ This is in my C:/ directory.
    ^ This is in my D:/ directory that I use for backup.

    I’ve tried many, many different web servers and each of them had the WordPress interface broken after transitioning to another directory.

    I tried to switch database, SQL, nothing changed. Which leads me to believe the issue comes from WordPress itself.

    Any solutions?

    • This topic was modified 1 year, 3 months ago by alemoth.
    • This topic was modified 1 year, 3 months ago by alemoth.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Tellyworth

    (@tellyworth)

    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://www.ads-software.com/documentation/article/changing-the-site-url/

    • This reply was modified 1 year, 3 months ago by Tellyworth.
    Thread Starter alemoth

    (@alemoth)

    @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 1 year, 3 months ago by alemoth.

    same happened with my website.. helpful for me too thanks

    Thread Starter alemoth

    (@alemoth)

    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 1 year, 3 months ago by alemoth.

    This sounds like the issue described in https://core.trac.www.ads-software.com/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.

    Thread Starter alemoth

    (@alemoth)

    @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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Website breaks when changing directory’ is closed to new replies.