Skip Navigation

[Resolved] From localhost to live: lost configs

This support ticket is created 7 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Author
Posts
#511906
probleme.jpg

I am trying to put my website live. Works perfectly fine on localhost. Imported database, SQL find/replace all tables with hidden link to hidden link, website works fine live...

Except all views don't work anymore! I went into every view individually (there are 40 of them...) and had to re-select the Custom Post Type it was associated to. It had disappeared! They were none selected. Also, all post relationship had disappeared, as well as Search code (when there was search code). However, all Loop code was there and fine.

I was in a hurry to put it online and go meet the client, I had to cancel the meeting as it took me 2 hours to refix everything!

What I want to know:
- Why is this happening?
- I have to modify the website on localhost tonight and put the finished version online tomorrow. How can I do this so I don't have to spend another 2 hours redoing everything ?

As I always work localhost before going live, this is something I need to understand if I want to keep using Tooolset.

#511968

Dear mylene,

There might be something broken in the database when you migrate your website. I suggest you try to follow our document to migrate your website:
https://toolset.com/faq/how-do-i-migrate-a-wordpress-site-from-one-domain-to-the-other/

#511985

That solved it!

#513851

No that didn't solve it!
HELP!
I still have 255 places in wp_posts and wp_postmeta where my old localhost url still appears, even after I followed the instructions in the URL above.
- If I do a find-replace in SQL like UPDATE wp_posts SET post_content = replace(post_content, 'hidden link', 'hidden link');
Then all views are corrupted. They loose the assigned CPT.
- So I tried by hand, changing the URL in SQL guid or post_content: DOES THE SAME THING: CORRUPTS VIEWS
- So I dropped the tables and put back my backup version of the database that I had just done
THE VIEWS WERE CORRUPTED FROM THE IMPORT

I had to redo 65 views by hand.

This is driving me nuts.

- How an I change ALL instances of localwebsite to livewebsite in database ?
in works when using %{%'; at the end of SQL statement, but does NOT replace all. They are a lot of /\/\localwebsite/\/\ left. Changing by hand one by one still corrupts views.