• I have window server, installed Xampp and installed wordpress with localhost site url

    when try to publish it online to log it from the webaddress for example:
    http//www.wordpress.com

    it redirects me to localhost and give me error.

    I changed the site URL in DB wp_option table to the website instead of localhost

    it worked fine but accessing from the server using localhost not working.

    Although
    when try to activate the multisite wordpress and adding the network setup codes in both web-config and htaccess

    the front page work fine, but when try to login it redirects me to
    localhost/wp-login

    so where the error and how to fix it?

    so it work fine from the website and localhost machine

    or at least from the website.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    There are usually a lot more URLs to change than just site_url in the options table when you move a site to a new domain. Use a plugin like Better Search & Replace to seek out all occurrences of localhost and change it to the proper domain name.

    For a complete run down of moving a site to a new domain, see Moving WordPress.

    Thread Starter emadhamdy2002

    (@emadhamdy2002)

    thanks a lot for your replay and answer,
    but isnot the normal when working on server that it work on both localhost and website?

    or only one of them will work ?

    Moderator bcworkz

    (@bcworkz)

    Sure, it “works” on both, but the underlying data can only be correct at one place or another because URLs are specific to only one server at a time. If a hosted site has image links to “localhost”, the post with the image may appear OK to you because you have the same image on your local site. But other users will see a broken image because they have no local site.

    On many hosted sites, the only localhost you would not change is the DB hostname. But even this changes with certain hosts.

    Thread Starter emadhamdy2002

    (@emadhamdy2002)

    thanks a lot will give it a try thanks alot

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘site url problem with multisite wordpress’ is closed to new replies.