Skip Navigation

[Resolved] Migrating site to another host with a new URL – Toolset View loses the settings

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user migrated their site manually but noticed that their views settings was lost.

Solution:

This is actually possible if the site it being migrated manually and all the links are not updated properly.

What you can do to avoid this is to use the duplicator plugin to perform your site migrations.

This support ticket is created 5 years, 8 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 8 replies, has 2 voices.

Last updated by Paul Marconi 5 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#1106713
screenshots.PNG

Hi,

I have Toolset Types & View plugins installed, and when I am trying to migrate a wordpress site to another host, I will upload the whole wordpress files & folders to the NEW server, then update the mysql database to the new URL strings by running some sql updates and replacement commands on the tables: wp_options, wp_posts, wp_postmeta.
This will get the site up on the new host, but in the Toolset Views, it always loses the selected post type for each view where some settings are gone too, keeping only the codes.

In the Toolset View list, I will get the message somewhat like below:
"any (missing post type) ordered by post date, descending, default items per page with manual pagination"

I have a screenshot attached.

Not sure is the problem with updating the database by running some SQL updates, but please find the SQL commands that I use to update the base url on the tables:

UPDATE wp_options SET option_value = replace(option_value, 'hidden link', 'hidden link') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'hidden link','hidden link');

UPDATE wp_posts SET post_content = replace(post_content, 'hidden link', 'hidden link');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'hidden link','hidden link');

I've tried using the Duplicator plugin to migrate the site, but it won't always work on some servers, so sometimes I have to do this manually.

Is there a way to update the base url in the database to the new URL without losing the Toolset View settings?

Thanks!

#1106793

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

Thank you for contacting our support forum.

Another alternative is that you can use the all in one migration plugin to do it.

If that doesn't help I would recommend updating the database sql file URL's before you import it. Views setting is stored in the database and if it's done this way then you shouldn't lose anything.

Thanks,
Shane

#1107762

Hi Shane,

What is the correct way to update the base url in the sql database file other than using the Find & Replace tool?
Is there a better way to update the base url once it's imported into the database without losing the Toolset View settings?

Thanks!

#1108358

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

Actually the best way I can think of is to do a find and replace on the sql file.

The only other way is to do it through the database itself using an sql query.

So long as all the url's have been replaced then you should be fine. In your case it seems that its not working.

Is the Types plugin showing the custom posts ?

Please let me know.
Thanks,
Shane

#1111513
1106713-screenshots.PNG

Hi Shane,

All of the Custom Post Types are still there with all of it's posts, the only issue is the Views. Every time I update the database by running some SQL updates (like I mentioned above), the Views are still there, but it loses it the selected post type and some settings are gone too, keeping only the codes, such as the image attached.

Thanks!

#1112320

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

Mind if If I took a look at this for you ?

The private fields will be enabled for your next response.

Thanks,
Shane

#1112976

Hi Shane,

The issue is already fixed, which I had to go into the Views tab to re-configure the settings for each view, so there's nothing really to show you. This was more of a general question on how to properly update the database without losing any settings for the Views.
Would you think instead of updating the database with SQL commands for the wp_posts & postmeta tables, should I use the plugins like 'Velvet Blues Update URLs' or 'Better Search Replace' to change old urls.

Thanks!

#1114382

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

I've actually never encountered this issue.

However what I usually do is to do a find and replace on all of the old website url , i usually do it for the domain name only example google.com instead of hidden link .This will ensure that i've gotten all the urls.

Thanks,
Shane

#1114481

Thank you for the advice!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.