• I’ve just installed wordpress on one of my servers in my datacenter according to this walkthrough https://codex.www.ads-software.com/Installing_on_Microsoft_IIS

    I can login to the admin page when I’m logged in to the server and the sample page displays correctly on the server. However, when I browse to the webpage from a client pc then the page does not display images correctly and I’m not able to log in to the admin page. The admin page keeps redirecting to local link, instead of the server name.

    I’m wanting to host this myself since my company has a very robust datacenter/server environment, instead of paying someone else to host the webpage.

    Do I have to have someone else host a wordpress server? What do I need to do to get the pages to display correctly for everyone else? In the install documentation, it said it gets installed in localhost mode, do I need to change that so anyone can browse to the webpage?

    I’m new to wordpress but I’ve used and managed many other kinds of webservers for companies and had the web servers deployed on premise instead of in the cloud.

    Thank you for your help.

Viewing 15 replies - 1 through 15 (of 15 total)
  • When you installed WordPress, did you do that using the local URL or the public URL? I’m guessing that it was the local URL.

    That’s the problem. thanks to (more than) a few years of technical debt, WordPress hard-codes the URL’s that it used when you install it. So, if you install using a temporary URL, that URL is used for everything, including URL’s when you upload images as well as CSS files, JavaScript files, etc.

    If you don’t mind starting over, the best thing to do is clear out the database and delete all of the files in /wp-content/uploads/ and re-do the installation from the public URL. If you don’t want to loose everything, you are going to need to use a search-and-replace script from the local URL. There’s plugins that can do that, and you’ll find them with a quick search, of theres this script that works well.

    Thread Starter fitzgeraldk

    (@fitzgeraldk)

    It’s a new server so I’m ok with wiping it clean and starting over. I did not see an option to install from the public URL. Did I follow the correct instructions from the link I provided? Should I have used a different installer package? All my permalinks do say localhost so you’re probably right. Is there a good walkthrough on how to set this up?

    The install process takes the URL that you use to install it. There’s no setting to change that.

    The way to do it is to start the install fresh again, but to access it from the final public URL that you want to use. That way it will always use that URL instead of any other local ones.

    Thread Starter fitzgeraldk

    (@fitzgeraldk)

    I’m not sure what you mean by accessing it from the public URL. Is there a walk through somewhere that explains how to do that? In the instructions I saw, it was accessed through the web platform installer in step two. https://codex.www.ads-software.com/Installing_on_Microsoft_IIS

    Instead of doing the set up through https://localhost do it through https://livesite.com Thats all there is to it.

    Thread Starter fitzgeraldk

    (@fitzgeraldk)

    wouldn’t that make my wordpress site hosted by livesite?

    The site will be hosted at the live URL anyway, won’t it? That’s what you wanted to have happen in the end, but the easy way to have that happen is to start off with the correct URL so that WordPress knows where to point everything.

    If you don’t want to do that, go back to my first comment and see the link there for the search-and-replace script that you can run when you’ve finished setting everything up and want to move to the live URL.

    Thread Starter fitzgeraldk

    (@fitzgeraldk)

    No, I said this in my original post that I do not want to have the site hosted. I’m installing this on a server in my datacenter. Is it possible to set up the site and not have it hosted? I’m installing on my server onsite and not in the cloud. How do I do that?

    Yes, I do know that you don’t want to host the site somewhere else, that’s not the issue.

    You said originally:

    “The admin page keeps redirecting to local link, instead of the server name.”

    What you need to do is go through the installation process using the server name, not the local link. That’s all. When you did your original installation, you used the local link, and that’s where the problem is. Use the server name that you’re going to have it accessible through and it will all work correctly.

    Again, remember that WordPress will only use one URL, so when you install it using a local or temporary URL, it will use that URL everywhere. That’s why you want to do the installation process using the final URL that you want to have with the system.

    Thread Starter fitzgeraldk

    (@fitzgeraldk)

    is there a walkthrough for this installation process somewhere? Is it a requirement to have the site hosted by someone else?

    There is no requirement for the site to be hosted commercially. You can host the site anywhere that you want. That part has nothing at all to do with the issue that you’re having.

    Go right back to the start with this.

    When you are installing WordPress, you used a local URL. I’m guessing that’s something like https://localhost/ but it doesn’t matter what it is, that’s just an example. Then your problem is that when other people view the site through it’s public URL, as another example https://publicsite.com/ they are not seeing it correctly.

    The only difference that you should make in the installation process is to use the public url of https://publicsite.com/ instead of the local one https://localhost/ when you’re doing the installation. That’s the only change that you need to make. You don’t need to host the site anywhere else.

    Thread Starter fitzgeraldk

    (@fitzgeraldk)

    I’m still not seeing where I can install it with the public URL. Is there a walkthrough for that? When I installed it, I was not prompted for any url.

    Would it be easier to change the URL? How do I do that?

    That part is easy. It’s not a setting. Its’ the URL that you use in your browser when you do the installation.

    Instead of starting off at https://localhost/, start off at https://publicurl.com

    That really is all there is to it.

    Thread Starter fitzgeraldk

    (@fitzgeraldk)

    that’s what I’m trying to tell you. I didn’t start off with a link. I used the web platform installer which was an exe and during the install process the URL was greyed out and autofilled with localhost.

    This is the process I followed.
    https://codex.www.ads-software.com/Installing_on_Microsoft_IIS

    OK, that does make a world of difference. You didn’t say before that it was an automated installer, so I assumed that you were doing a standard maual installation.

    Automated installers suck. I won’t use them for various reasons – your issue being just one of many. The other biggest reason that I’ve seen is that a lot of them don’t allow updates for the core WordPress systems until they are provided by the installer company, so that can lag behind several weeks to months for security issues.

    So, to fix your issue there’s two choices…

    First, do a manual installation and forget about the automated installer.

    Second, use the script that I gave the link t way back up in my first reply, and that will do a search-and-replace on the database to change all of the local URL’s to public URL’s.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘WordPress pages do not display correctly on clients after deploying new server’ is closed to new replies.