Theme not working after restoring to a new server

Posted in: Newspaper
Post count: 7

We’re trying to copy the data from our production site to a staging site. We’re snapshotting the filesystem and the database and restoring them (then tweaking environment specific values).

After the restore, the tag div/newspaper theme appears to have been deactivated. We’ve reactivated them, but the theme isn’t working. Is there some trick to getting the restored site to work properly?

Thanks,
Brad

Post count: 9544

I’m sure somebody else will mention, but best way to migrate from production to live site is often using the DUPLICATOR plugin

Post count: 7

Thanks for the link. I’ll have to check this out, although, at this point, we have a process that works for other sites (not using newspaper/tag drive) and works for this site otherwise, minus the newspaper theme. It’s almost like the CSS isn’t loading. However, I looked in Chrome developer tools and saw no errors about missing resources.

Post count: 27744

Hello,

Can you please provide some screenshots with the errors? Also, did you check if you have activated the required plugins?

Thank you!

Post count: 7

The site is an adult site—I don’t know if you want me to paste screenshots here. 🙂 But suffice it to say the content and images load as expected, but the appearance doesn’t match.

On production, we’ve got a black background; on dev/staging, we have a white background. Other things are wrong, too, like the font face.

In terms of errors, I don’t see any 500 or 404 errors on the site when I load it, so it doesn’t appear as if content isn’t loading.

Checking the PHP errors on the site, there are some errors, but they don’t appear to be related to the newspaper theme (they are other plugins), which seem unrelated.

Post count: 27744

Hi,

I think that when you did the import, the settings from the theme panel were not imported as well.
Please check this guide https://forum.tagdiv.com/import-export-theme-settings/

Thank you!

Post count: 7

It seems like post restore the newspaper theme license is deactivated.

I re-activate the license but then If I go into the header the theme panel all the settings are wiped out. For example on the header the Cloud Library Template is set to “No Template” on staging but on production its set to “Header Template – Default”

I went into production and used the import/export to export all the settings and then imported them on staging. After doing so I can now see all the settings for example the Cloud Library Template is now set properly. However even after doing a cache flush things still don’t appear correct.

I disabled the Newspaper theme and enabled the Twenty Twenty Four theme, then re-enabled the Newspaper theme and now my site looks much closer to production – the background is black and the fonts are correct but the navigation is missing and there’s all this extra space on the top. Highlighting the empty space I see its code like this:

[tdb_header_logo align_vert=”content-vert-center” align_horiz=”content-horiz-center” image_width=”eyJwb3J0cmFpdCI6IjIyMCJ9″ media_size_image_height=”165″ media_size_image_width=”600″ tdc_css=”eyJhbGwiOnsiZGlzcGxheSI6IiJ9fQ==”]

What would cause this? Is there something else I need to export from production and import onto staging?

Post count: 7

Is there another way to export/import newspaper theme settings programmatically, either using an API call or via the WP CLI tool?

Post count: 27744

Hello,

Please use the duplicator plugin because your method didn’t work https://www.youtube.com/watch?v=LAJXrSI-dDA
Using the import/export option from the theme will allow you to import only the theme panel settings, the cloud templates go in tool > export – https://i.imgur.com/3Wxk885.png then to import you need to go in tool > import then install the wordpress importer and clink on run import – https://i.imgur.com/tyxoVvg.png

Thank you!

Post count: 7

The site is roughly 200GB in total. Is the duplicator plugin going to sync all the content (all 200GB) between sites, adjusting all the environment site-specific settings in all plugins we’re running?

Currently, we’re using storage snapshots, which allow us to make a full backup and restore in approximately 5 minutes. I’m concerned that Duplicator may not match this speed and efficiency, and it costs a yearly fee.

Rather than start over with a new approach that may or may not introduce new problems, I’d like to understand why this isn’t working. This approach is working for all our non-newspaper theme sites, so this seems tagDiv/newspaper-specific.

Is there another reason why the menus would be messed up after the restore? Do menus not get stored in the export? Are they stored separately?

Can we call the newspaper theme import/export from the WP CLI tool? If so, we could export the settings before the restore and reimport them afterwards.

Thanks!

Post count: 9544

DUPLICATOR works to migrate all settings and can also fix any URLs like links to /staging/pagexxxx/ to /siteurl/pagexxx

I have used it for many years and if you read up about it online, it’s truly priceless for this stuff.

Post count: 7

In our DB backup, we are searching and replacing similar to this:

sed -I 's/www\.ourdomain\.com/staging\.ourdomain\.com/g' backup.sql

Which searches for any instance of the production URL/domain and replaces it with the staging URL/domain.

I suspect TagDiv/Newspaper is storing the site URL in a binary blob or other data field that doesn’t like this sort of search/replace.

If I omit the step to search the database and restore without a find/replace and then do some manual cleanup, things seem to work as expected. However, I’m potentially risking references/calls to production on staging.

I’ll have a look at DUPLICATOR at some point. It looks intriguing, although we’ve already automated this process, and it works fine for all our other sites except for this one site that runs the Newspaper theme.

I’ll have to decide whether to skip the DB search and replace or start over at square one by trying DUPLICATOR.

Thanks

Post count: 27744

Hello,

You can try to recreate it with tagdiv composer and set the menus, colors, and fonts on the website where they are not imported.

Thank you!

Viewing 13 posts - 1 through 13 (of 13 total)
The forum ‘Newspaper’ is closed to new topics and replies.