So you’re trying to copy the website you just developed using the Avada theme to a webserver. Upload done, all you need to do is export the local Avada theme options to a JSON string, and import them again on the server. And then it fails: You land on a 404 page that says that […]

This article was posted by Independent Software, a website and database application development company based in Maputo, Mozambique. Our website offers regular write-ups on technical and design issues, ranging from details at code level to 3D Studio Max rendering. Read more about Independent Software's philosophy, or get in touch with Independent Software.

So you’re trying to copy the website you just developed using the Avada theme to a webserver. Upload done, all you need to do is export the local Avada theme options to a JSON string, and import them again on the server. And then it fails: You land on a 404 page that says that options.php  could not be found.

This is the Avada Theme Options import/export screen:

What gives? You know that wp-admin/options.php  exists. You can visit it in your browser. Now you could copy all options manually, one by one, but recent versions of Avada contain hundreds of options, so that would be a time-consuming, error-prone job. What could break the options import?

The options string is a JSON string. You can examine it in a text editor. There are no line breaks, but you can use an on-line JSON formatter to make things readable (it won’t affect the import process). Next, you can import bits and pieces of it. Importing just a few options works. Importing some more, still works! And then it breaks again. Doing a binary search, it turns out that the following option is the culprit:

It’s a bit of custom HTML, including JavaScript, added under Advanced/Code Fields (Tracking etc.) of the Avada Theme Options.

Since there is no error message, it’s not clear what causes the problem. It might be the presence of script tags, the presence of line breaks, or double quotes. After removing this option from the JSON string, things work fine. You can add the option back afterwards in the Theme Options panel.

Save

Did this article help you out? Please help us find more time to write useful guides & articles like this by donating a buck or two. It'll keep us coffee-fueled. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *