The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Correct method to move wordpress from 'localhost' to and IP address/domain setup (3 posts)

  1. azibux1
    Posted 2 years ago #

    Hi all,

    I'm a bit confused on how to do the above. I setup wordpress and developed my website all using 'localhost' all of the time

    So all SQL statements, links, everything all use 'localhost'

    Now I'm looking at moving it to a hosting solution I am a bit stuck as I've copied the files over, created the database etc but I couldn't see any styling at first (this has now changed), but I don't think I've done it the correct way as all links within my website pages, the home button on the menu, all pictures used in my themes picture slider have all had to be changed manually to the domain name, otherwise it tries to look for files and pages on 'localhost', which obviously aren't there as localhost (for the user) is just the users PC rather than the server.

    Surely there must be a better way of doing it so you don't need to change all the links, I could imagine this being a massive task on a big website

    So what I've done overall is copy files, create database, changed WP Address URL in the options to the local IP of the server it is hosted on, changed Site Address URL to the domain name URL (which is forwarded to the local IP of the server, using port forwarding)

    The reason I set the local IP of the server as the WP Address URL is because that allowed the SQL statements to work without being re-written

    Hope someone can help and tell me the proper way to do this :)


  2. phe.le
    Posted 2 years ago #

    You're doing correctly; however, the links and images still have old URLs. You can follow the instructions below. Then update your permalinks in wp-admin.


  3. azibux1
    Posted 2 years ago #

    Thanks I've tried that and I think I'm getting there, it is just a matter of getting the correct domains and addresses

    What I've done is the wp_posts SET guid and wp_posts SET post_content and I've set them both to my domain name, but it doesn't quite work

    Navigating around the webpages manually I go to domain/?page_id=13 (for example) but the links are modified to domain/wordpress/?page_id=13 which doesn't work

    Do you know what I've done wrong please?


Topic Closed

This topic has been closed to new replies.

About this Topic