0

My client already had a non-wp website. I recommended WP and for some reason client wanted to change hosting. So I decided to follow the steps given below: 1. developed WP website on a local host 2. Install wordpress on the new hosting service 3. Import new site files using plugin 4. Change the name servers to direct it to new hosting.

After installing WP at new hosting, when I tried to login to admin panel, it took me the old website. It is not giving me the WP-admin panel.

Could you please suggest what I am doing wrong and what should be the right course of action?

Thank you.

1

If you are creating the new WP website on your local, then there is no need to pre-install WP on your new hosting server. Just copy all the data (files + Database) to the hosting. And then:

  1. Change the database details in wp-config.php
  2. Change the site url in the wp_options table in DB (2 entries)
  3. run a search replace script to change all old local url to new one (if required).
  4. Refresh the permalink once done.

Hope this helps. Let me know if you need any more help.

4
  • Thanks, Siddharth. I understand what you are saying. Just for my understanding, why is it that when I install WP at my new host and click the link - www.website.com/wp-admin - it takes me to the home page of the old website even though the nameservers are not changed yet? Regards. – Vaibhav Aug 3 '17 at 4:40
  • I am sorry, i am having a hard time figuring out the problem. If the nameserver is not changed then it is going to access the previous hosting data. If you changed the nameserver and still getting the old server website, then you might have to contact your domain provider. – Sid Aug 3 '17 at 5:25
  • Hi Siddharth, Thank you very much. I tried what you had suggested and I seem to understand it. However, when I import my database (SQL file), it shows some syntax errors. I also tried changing the version of my php but it didn't work. Can you please tell if my website wouldn't work because of php errors? If yes, how to fix it? I am sorry that my questions may sound really foolish but I am not a programmer. Just trying to fix up my own website and learning in the process. – Vaibhav Aug 7 '17 at 7:13
  • hey @Vaibhav! sorry i lost touch due to some personal work. Please let me know if the problem still persists. And it would be great if you could share some screenshots, website URL or the error code. – Sid Aug 19 '17 at 5:10
0

First step is to check the two entries in the wp_options table that specify the URL. That is usually the problem, in my experience.

My favorite way to move sites is to use the WP Clone plugin (here https://wordpress.org/plugins/wp-clone-by-wp-academy/ ). Makes it quite easy, changes everything that needs to be changed. You just backup the source, restore to the target, then log in with the source credentials. It just works every time I use it. Copies all content, adjusts URLs, etc. Easy peasy.

1
  • Thank you, Rick. Your suggestion helped too. Can you please also look at another problem I am facing? When I import my database (SQL file), it shows some syntax errors. I also tried changing the version of my php but it didn't work. Can you please tell if my website wouldn't work because of php errors? If yes, how to fix it? – Vaibhav Aug 7 '17 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.