-
Delai Costa
Hello.
I came across a situation today when I changed my site’s domain, and I’d like to share it for you to investigate.
After changing my site’s domain, some header and menu settings were lost from the old site.
The procedure I followed was basically this:
* I created a new domain in cpanel.
* I moved all the site files to the new domain folder.
* I accessed the database and defined the address of the new domain.
* Via SQL I tracked and changed all occurrences of the old domain and switched to the new domain.
* Then I was able to access the site normally.
* In the wordpress control panel,
already accessing the new domain I accessed the permalinks, changed it, saved it, then went back to the previous one and saved it again. To ensure permalinks have been updated.Everything worked fine, however when accessing the site, some header and main menu settings were different. I know this because the header has changed style,
and I compared it to another site that had the same setup.I then redid the settings and the header and menu were as before.
The settings I noticed changed after the domain change were:
* LAYOUT:
– HEADING:
The option use navigation as header was disabled and all settings were lost,
including the image that was defined. I had to reselect the image from the library and redo the settings.– PRIMARY NAVIGATION:
The “Navigation Alignment” option was set to “right” before changing the domain it was “left”.
On one site, the option to display the search in navigation was as before: “Search in navigation”, on another site, this option disappeared and only a checkbox “Enable navigation search modal” is displayed, where the old option ended up, no modal?– FIXED MENU NAVIGATION:
Before it was ONLY ON MOBILE DEVICE,
after changing the domain it appeared OFF. I had to activate and reconfigure everything, including adding the Logo.– OFF CANVAS PANEL:
Before it was ON MOBILE DEVICE ONLY, after changing the domain it showed OFF. I had to activate and reconfigure everything.I reactivated the license on the new domains after noticing this error.
But the button to display the old search field “No Modal”, which extends over the header is no longer available on this site, strangely, on other sites, the option is still there. -
Delai Costa
-
Fernando
Hi there,
The Search feature was updated to the new Search Modal. Reference: https://docs.generatepress.com/article/navigation-search-modal/
If you want to use the old system, you can add this snippet:
add_filter( 'option_generate_settings', function( $settings ) { $settings['nav_search'] = 'enable'; return $settings; } );Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets
The other issues you mentioned seems like a database issue. Glad you were able to fix them though!
-
Delai Costa
Thanks for you reply.
About the problems, it would be interesting for you to analyze the reason for losing these configurations. Well, this shouldn’t happen.
-
Fernando
GeneratePress has no control over how you store and transfer database data. It just grabs and saves data from specific tables with GP identifiers.
You’ll need to check if the way you setup your Database worked properly. It doesn’t seem like it did. In any case, you can export and import all Customizer settings, except for Custom CSS, through Appearance > GeneratePress – This is the safest and our recommended way to transport Customizer data.
-
Delai Costa
So, as I said, I didn’t restore the database. I just changed the website domain. and I changed the references to the old domain in the database. the same files and database were used.
-
Fernando
Doing that should have been fine. Was there anything missing from your domain change aside from the Customize settings? Can you also check if there’s something off in the
generate_menu_plus_settingsoption in the wp_options table?There’s no code in GP that would suddenly change those data with just a Domain change. What I’m thinking caused the issue is a somehow reset in the wp_options table or just some data of options in a step you took.
-
Delai Costa
Ok, very thanks.
-
Fernando
You’re welcome, Delai! Have a nice day!
- You must be logged in to reply to this topic.