• Resolved adstaa

    (@adstaa)


    Hi all. Apologies if this has been covered, but I couldn’t find exactly what I was looking for.

    I’m finishing up development of a site on our hosting server. I want to switch the site to live (old site is currently still live and hosted elsewhere) but keep it on the existing server location.

    Am I correct in that I can run the process of changing the URLs from the dev URL to the live URL (using a plugin or otherwise), and then just repoint the DNS to the new hosting?

    I’m new to this and have only thus far created sites on newly purchased URLs where I’m not switching from an existing host/site.

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • changing DNS will direct URL to your server only. If you are only worried about the URL and not the data on old site, then yes that SHOULD work, but yes you may also want to run a search and replace on the database (with a plugin, wpcli, or directly on database) for good measure to make sure all of the references to the old URL are removed and replaced with new one.

    If you need any user accounts, logins, or other data you will also need to import the database from the old site.

    • This reply was modified 5 years, 6 months ago by dabricksz.
    Thread Starter adstaa

    (@adstaa)

    Thanks for the reply.

    So I could use a plugin like Better Search Replace for this?

    Moderator bcworkz

    (@bcworkz)

    That’s the plugin I would recommend 🙂 I would advise against doing search/replace directly on the DB because there’s a real risk of corrupting serialized arrays that contain domain names. The plugin knows how to properly alter serialized data.

    Thread Starter adstaa

    (@adstaa)

    Thanks for your help

    • This reply was modified 5 years, 5 months ago by adstaa.
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Moving from dev to hosting on the same server’ is closed to new replies.