[resolved] from Localhost to webserver (problem) (6 posts)

  1. alyas2022
    Posted 7 years ago #

    I've installed WP on my computer using XAMPP, anyway, whene I uploaded finaly to a server on the web, and I upload my database, all my links are redirected to the localhost like :


    I think its easy to do it, but, I don't know what to change in the Database to make it work fine and to change de "localhost" to "mywebsite.com"

    I'm all ears

  2. Adam Brown
    Posted 7 years ago #

    When you install WP, it creates a config file. Sounds like you installed on your computer, then moved it all to a host. Problem is, you moved it without changing the config file.

    If you know what you're doing, edit the config file. If you don't, delete the installation on your server and install a new copy of WP. Then, go to your computer's version of WP and use the export option. Go back to the webserver's WP and import the exported dump.

  3. alyas2022
    Posted 7 years ago #

    thx for your time, but
    the probleme is not with my "config.php" file :) I modified it to match the new database settings, but with what is inside the Database, everything link to "localhost/wpblog/

    I think I should change all the links manually by exporting the old database and browsing it looking for the links and change them to match my new web adresse !!

    am I right ?!

  4. Adam Brown
    Posted 7 years ago #

    Ahh, so it's links in posts and such that you're talking about, not the generated links. Here's something you can try that I did once when moving a wiki:

    Dump the mySQL database (for your current site) into a text file. Do a find and replace on "localhost/wpblog" to what you want all those new links to be.

    Re-import to your mySQL database.

    But backup before screwing around like this.

  5. alyas2022
    Posted 7 years ago #

    Yes, this is what I'm doing by now, its too long, but I think I don't have a choice

  6. moshu
    Posted 7 years ago #

    If everything is redirecting to localhost - you made the mistake of not reading the Moving_WordPress article from the Codex.
    Otherwise you would know you need to change the site_url and home values in the wp_options DB table.

Topic Closed

This topic has been closed to new replies.

About this Topic