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