WordPress.org

Ready to get started?Download WordPress

Forums

Moving local site to remote server - new WordPress installation? (27 posts)

  1. AliG2
    Member
    Posted 10 months ago #

    Hi there,

    I already have a website up and running on WP. I now have a second website, that I have built locally and now want to move to make it live.

    The old (existing) site was built and hosted by another company, which is still live, until my new website takes over.

    I have gone through the process of moving my local site to the new server: new database, wp-config file and sql. It all seems to be up on my server.

    Do I now need to install another WordPress installation on my machine, that can allow me to manage the new website? Because I developed the new site using WP locally - do I still need to do another new install for this 'live' version?

    When I type in http://www.mynewwebsite.com/wp-admin.php it redirects to the current (old) live site. So I can't seem to find/manage/edit my new (though it's not live yet because we haven't done the redirects) website?

    I am stuck - could anyone advise?

    Thanks....

  2. esmi
    Forum Moderator
    Posted 10 months ago #

    do I still need to do another new install for this 'live' version?

    No. You can continue with the development on the remote server.

  3. AliG2
    Member
    Posted 10 months ago #

    Thanks for getting back to me Esmi.

    How do I access the new dashboard, to edit my new site?

    If I use this URL, http://www.mynewwebsite.com/wp-admin.php, it redirects me to the current (old) site - I don't seem to have a way of viewing/editing my new site in the WP dashboard before it goes live.

    Could the issue be that we haven't redirected the IP address and nameservers? Or should I still be able to access the management dashboard regardless? I can still go into my local dashboard to edit - but this is not what I want - as I have now moved it to a remote server.

    Thanks...

  4. esmi
    Forum Moderator
    Posted 10 months ago #

    When you moved the site to the remote server, did you follow the instructions in Moving_WordPress?

  5. AliG2
    Member
    Posted 10 months ago #

    Yikes - I've lost the WP management dashboard!

    I just went into the local WP dashboard and changed the Settings Site URL to my new website, overwriting http://localhost:8888/wordpress, and now I can't get into the dashboard at all - it just takes me to the existing (old) website!

    Any ideas on how I can restore the dashboard back to http://localhost:8888/wordpress.

    To set the initial transfer over, in answer to your question, I followed these instructions: http://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-from-local-server-to-live-site/

    I just went onto the page you sent through, and made the changes on the dashboard to the URL settings. Now I can't get in to any dashboard.

    Thanks....

  6. esmi
    Forum Moderator
    Posted 10 months ago #

  7. AliG2
    Member
    Posted 10 months ago #

    Hi Esmi,

    Just to update from my last message, I have now restored my WP dashboard, for my local site - so the URL's are now back to where they started.

    However, I still cannot access the WP dashboard for my new site, on the new server.

    Just to reiterate, I built the site locally, so the URL's in the WP dashboard are http://localhost:8888/wordpress. I then moved the files and folders to the remote server, set up the database and changed the wp-config file.

    The existing (old design) is currently live as we haven't changed the IP address and nameservers.

    Before we do the changeover, I wanted to check my (new) design out to make sure it looks and works as expected. But I don't know how to access the WP dashboard to edit and view my site.

    Are there further changes that I should be carrying out?

    Thanks....

  8. esmi
    Forum Moderator
    Posted 10 months ago #

    Did you follow the instructions in Moving_WordPress?

  9. AliG2
    Member
    Posted 10 months ago #

    I'm assuming I need to follow the instructions from half way down the page, 'Moving to a new server', as my domain changes from http://localhost:8888/wordpress to http://www.newwebsitename.co.uk.

    Once I have completed these steps, how do I then log on to my WP dashboard?

    Should I enter http://www.mynewwebsitename.co.uk/wp-admin.php, and that will bring up the login details for me to enter my dashboard (and also discard my local one, http://localhost:8888/wordpress/wp-login.php)?

    Should I also notify the other company (who are currently hosting the website) to redirect IP address and nameservers, or wait until I have this up and running successfully on my servers?

    Many thanks....

  10. AliG2
    Member
    Posted 10 months ago #

    Hi Esmi,

    I have followed the instructions from your link, updated with new database, files and wp-config but I still cannot access my WP dashboard.

    When I type in http://www.newwebsitename.co.uk/wp-admin.php I just get redirected to the current (old design) live website.

    Any ideas? I am really stuck :(

    Thanks....

  11. esmi
    Forum Moderator
    Posted 10 months ago #

    Sounds like you did not did not run a search & replace on the db backup to change the old urls to new new ones.

  12. AliG2
    Member
    Posted 10 months ago #

    Hi,

    I changed the SiteURL and Home to reflect the new URL's, replacing localhost, under the Options tab in the database.

    Is that what you mean?

    Thanks....

  13. esmi
    Forum Moderator
    Posted 10 months ago #

    No. You need to work through all of these steps

  14. AliG2
    Member
    Posted 10 months ago #

    Hi Esmi,

    I followed these steps last night, and did it again this morning, but I still get redirected rather than login to the dashboard.

    I just carried out a search and replace using this script in the SQL file, 1
    UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/test/', 'www.yourlivesite.com');

    But still nothing. I'm so lost!

  15. esmi
    Forum Moderator
    Posted 10 months ago #

    No - follow the steps in the Codex page.

  16. AliG2
    Member
    Posted 10 months ago #

    Hi Esmi,

    Where do I start from on that page of the Codex?

    I am moving from my local host, to a remote server - so I start following instructions from here, with the 3 steps:
    Moving to a New Server
    If you are moving WordPress from one server to another, begin by backing up your data. This includes backing up your WordPress database as well as all the core files, images, plugins, and other files on your site. See WordPress Backups and Backing Up Your Database for more details.

    Rather than from higher up in the page with the 14 steps,
    When Your Domain Name or URLs Change
    When your domain name or URLs change - i.e. from http://example.com/blog to http://example.com, or http://example.com to http://example.net - there are ...

    Is this right?
    Also, there is no reference to the search and replace on the old database within this section, 'Moving to a new server'.
    At what point do I run the search and replace? Do I do that at Step 3 (in the Moving to a new server section) before I download the database to then upload to the remote server?

    Thanks...

  17. esmi
    Forum Moderator
    Posted 10 months ago #

    Start here.

  18. Zakir Sajib
    Member
    Posted 10 months ago #

    Try this if you want to change old url to current url

    Just write in wp-config.php

    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
  19. Zakir Sajib
    Member
    Posted 10 months ago #

    For replacing old url in post contents try following mysql code which will replace your old url with current one.

    You need to run this sql query in phpmyadmin or any mysql sql query interface.

    UPDATE wp_posts
    SET post_content = REPLACE(post_content, "http://www.old.com", "http://www.new.com"),
    guid = REPLACE(guid, "http://www.old.com", "http://www.new.com");
    
    UPDATE wp_comments
    SET comment_author_url = REPLACE(comment_author_url, "http://www.old.com", "http://www.new.com");
  20. AliG2
    Member
    Posted 10 months ago #

    And carry on through those 14 steps under 'On your existing server'?

    I am going through this now, and am on Step 8:
    8. Move your WordPress core files to the new location. This includes the files found within the original directory, such as http://example.com/wordpress, and all the sub-directories, to the new location.

    Does this mean, move my files to the root directory on my remote server? As I don't want to move them to new location on my local server.

    Many thanks....

  21. What you really want is to follow Esmi's directions via that link she shared. ;)

    Just write in wp-config.php

    No don't do that. That's not applicable to this problem and using those defines is really only a work around and doesn't fix it. If that were the problem then updating the option is what you'd want.

    update_option('siteurl','http://example.com');
    update_option('home','http://example.com');

    That's from the "Change The Site URL" article but again, please follow the link Esmi posted.

  22. AliG2
    Member
    Posted 10 months ago #

    Hello Jan, Esmi,

    Thank you.... I'm just confused about where to start and finish on that link.

    Do I go through those 14 steps under 'On your existing server'?

    I'm confused because I want to move to a remote server, don't I?

    I have been going through those steps, but I am now stuck on what to do on Step 8.

    Does that make sense?

    Thank you....

  23. AliG2
    Member
    Posted 10 months ago #

    Or, do I follow the first set of instructions: perform a search and replace on the wp_posts table.

    Skip the next 14 steps, under 'On your existing server'.

    And then start following the instructions further down the page, 'Moving to a new server'.

    Is that the right process?

    Thank you...

  24. AliG2
    Member
    Posted 10 months ago #

    Hi,

    I still can't get this working.

    I started off with Search&Replace, using interconnect.

    I then went down to follow the instructions under 'Moving to a new server'.

    I've then gone to login to my dashboard, using http://www.newwebsite.co.uk/wp-login.php and it just redirects to the live site.

    It's been 5 days trying to work this out.... I don't know what to do next?!

    Any guidance?

    Thanks....

  25. albertpesto
    Inactive
    Posted 5 months ago #

    Hey there,
    I can understand how tough it gets to move the wordpress website from localhost to server. You may have read that there are few url's to change and you are good to go, but that is not the case. Kindly go through this link and you will accomplish the task easily. This is really helpful at it makes all the database changes automatically and the whole process is completed in mere 20 minutes.

    [Link removed]

  26. yehudah
    Member
    Posted 5 months ago #

    To my opinion the best way is to edit the fields needed in database with phpmyadmin but it maybe to advance to some users.

    try using this plugin:
    http://wordpress.org/plugins/wordpress-move/

  27. esmi
    Forum Moderator
    Posted 5 months ago #

    @albertpesto: Please stop using these forums to post links to your site's articles.

Reply

You must log in to post.

About this Topic