• I’ve followed the instructions in this post to change my site url in the Dashboard under Settings>General, to remove the trailing “/wp”. https://www.ads-software.com/support/article/changing-the-site-url/

    I’ve also read this post and completed/checked everything under Troubleshooting.
    https://www.ads-software.com/support/topic/read-this-first-wordpress-master-list/

    When I change the Site URL to https://example.com (removing the trailing /wp) I get a 403 error page when trying to view the site, and in the site preview in the theme’s Customizer. ETA: The site will still come up at old site url https://example.com/wp, though it opens on theme’s “page not found”.

    Site is not built or live. Currently testing with the twenty-twenty theme as suggested in the “master-list” post.

    Hosted site running wp 5.8.2, php 8.0, no plugins installed. Softaculous installer. Litespeed Cache runs on host’s backend so cannot be disabled.

    Deleted contents of public_html folder to get a truly clean install of WordPress.

    I must be missing something. Have searched this forum, but perhaps I missed the answer. Would appreciate if someone could, please, point me in the right direction.

    Many thanks,
    Kim

    • This topic was modified 3 years, 2 months ago by wardencenter.
Viewing 10 replies - 1 through 10 (of 10 total)
  • WordPress uses the path where it’s installed for its URLs. So if you installed WordPress at public_html/wp/, your WordPress URLs become example.com/wp/.

    Simply changing the site address to example.com will break your site, as this URL doesn’t correspond with the location of the WordPress files at public_html/wp/ any longer.

    You have two options:

    1) You can MOVE the WordPress files from public_html/wp/ to just public_html, which will make it correspond with the site address example.com.

    2) If you’d rather keep the WordPress files in their own directory (eg public_html/wp/), you can do so and still have your URLs at example.com. But there are additional steps you need to take beyond just changing the address. Here’s the official documentation: Giving WordPress Its Own Directory.

    Good luck:

    Thread Starter wardencenter

    (@wardencenter)

    Thanks, George, but I’ve no need to move my current WordPress installation/files to a different directory and then change the site url. I only want to change the site url so that the website is served from its root. As described in this originally linked article:

    Changing The Site URL

    Are you saying the originally linked article, also an official WordPress support article, is incorrect? And, so I need to address the .htaccess and index.php/web.config files even though I’m not moving the wordpress files?

    Are you saying the originally linked article, also an official WordPress support article, is incorrect?

    It’s correct, but it caters to a different use-case than yours — the default and most common scenario where the “WordPress URL” and “Site URL” are the same.

    The support article for YOUR SPECIFIC USE-CASE is the one I gave you.

    The title alone should give you a hint: “Giving WordPress Its Own Directory”.

    Good luck!

    Thread Starter wardencenter

    (@wardencenter)

    Thanks for the additional reply. Please forgive, but I’m not understanding.
    What I need to do: Change my site url.
    Can you help me understand why the article “Giving WordPress its Own Directory” is more applicable to my “specific use-case” than the article titled “Changing the Site URL”?

    Maybe I am misunderstanding you.

    Can you let please me know where your WordPress files reside? What’s the path? Is it public_html/wp/ (or some other sub-folder under public_html as I supposed?

    Thread Starter wardencenter

    (@wardencenter)

    My WordPress files reside in public_html/wp. Sorry I wasn’t clear on that.

    Your WordPress files live at public_html/wp

    And you want your website to use the address: https://example.com

    Please READ and follow this guide: Giving WordPress Its Own Directory.

    Please do take a quick glance through the whole article. Since you already have your WordPress files at public_html/wp, you would not need to perform every single step (eg moving the WordPress files). But you do have to perform some additional steps beyond changing the address in the WordPress dashboard!

    And do write back if you encounter any challenges implementing the steps in that support article.

    Good luck!

    Thread Starter wardencenter

    (@wardencenter)

    Well, I’ve asked for help, and you’ve been kind enough to reply and I sincerely thank you.

    However, I do need to understand why the guide (that I did read, btw) “Giving WordPress its Own Directory” applies to my situation when it addresses moving a root install and/or moving the WordPress core files and then subsequently changing the site url. I do not need or want to move the WordPress core files. My WordPress core files reside in the default location of public_html/wp/ and I’m happy with them being in that location.

    Hope that makes sense.

    When you place your WordPress files at the root, eg public_html, your site address becomes example.com.

    When you place your WordPress files in a sub-folder, ex public_html/wp/, your site address includes this subfolder, eg example.com/wp/.

    That is the norm.

    The article in question “Giving WordPress its Own Directory” allows you to have your WordPress files in a sub-folder, eg public_html/wp/, and yet have your site available at the root domain or sub-domain, eg example.com.

    Which, if I understand you correctly, is what you want to have at the end of the day.

    I guess the confusion is stemming from the fact that the article is written from the perspective of someone who initially installed WordPress at the root level (eg public_html) with the corresponding address example.com.

    But this user now wants to de-clutter the root public_html folder by moving the WordPress files to public_html/wp/, while still keeping the site address at example.com.

    Your case is similar, except you came from the opposite direction: you initially installed WordPress at public_html/wp/ with the corresponding site address example.com/wp/. But now you want to change the site address to example.com, which, under normal circumstances, would involve moving the WordPress files to root public_html as well. Except, if I understand you correctly, you don’t want to move the files: you want to keep the files at public_html/wp/.

    Though you came from the opposite direction, the end result is the same: the location of the WordPress files is at public_html/wp/, which does not correspond with the site address you want to use example.com.

    Which makes this article apply to you.

    As I said earlier, you wouldn’t have to move your all WordPress files to a subdirectory, because you already have the files in a subdirectory. That’s where you started from.

    In fact, if you look further down the page, you’ll see the text: “(p.s. If you’ve already installed WP in subdirectory, some steps might be already done automatically)”

    So this support article applies to you, but you have to adapt it to your specific case where you already have the WordPress files in a subfolder (basically you can skip some of the steps).

    Thread Starter wardencenter

    (@wardencenter)

    Thanks, George. I understand everything you’ve said here and was guessing the “p.s.” that you quoted was the reason behind your instruction. I think the article I referenced is then in error because it clearly states all that’s needed to change a site url is changing one field from within the Dashboard.

    I will do as you suggest, but will also write feedback on the original article I referenced, Changing the Site URL, to say that it needs amending.

    Amendment to include same text from your article that an additional step of copying (or moving, depending, as stated) the files index.php, .htaccess/web.config, even if one only wants to change the site url without changing the location of WordPress core files.
    Do you agree?

    Thanks again for your patience and for sharing of your knowledge.

    • This reply was modified 3 years, 2 months ago by wardencenter.
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Changing Site URL – What am I missing?’ is closed to new replies.