Upgrading from v1.x.x

In this chapter, we’ll document all the steps that needs to be done while upgrading from 1.x.x to 2.x.x.

No Customisations scenario

If you have not made any .css or .php changes to Electro parent theme or child theme and if you have made only customisations via theme options (i.e. via Electro menu in admin panel) then you can update to 2.x without any issues.

Modified .php or .css via Electro child theme

This is the most common scenario. Since we’ve rewritten lot of code some of the customisations that you might have added may not apply to Electro 2.0. So it is important to identify what type of customisations you’ve made, check against the changes that have been implemented and then update the customisations accordingly.

CSS Changes

In Electro 2.0, we’ve replaced traditional layout using float with the more advanced Flexbox. We’ve also re-written Product, Header and Footer blocks with improved CSS. If you have written CSS customisations to any of these blocks. It is most likely that they may not work or break existing layout.

PHP Changes

We’ve made sure that not to remove any old functions to help in backward compatibility. We’ve re-written Header and Navigation actions but we’ve used new actions instead of old ones. This means if you had made custom changes to old actions, they may not work anymore. You need to update old actions to newer actions.

Template Changes

If you’ve overridden templates by copying them to your child theme, you should check the latest version of those templates in the parent theme and update your child theme accordingly.

Use a staging server

If you have made customisations via child theme, we recommend that you use a staging server to update the parent theme and migrated the child theme hooks and CSS to latest ones in 2.0. You should never make updates to live ( or production ) server.

How to create a staging server

WP Beginner has a wonderful article on how to setup a staging server. You can view it here : http://www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site/. Once you have a staging server, you should update the parent theme and then migrate your custom CSS and PHP functions.

Modified core parent theme

We do not recommend modifying the core parent theme. It creates ambiguous code and makes it difficult to maintain your customisations. You should identify the files that have been changed, save the code separately and then migrate the code one-by-one via a child theme.

Common Issues

We will update this section as we come across common issues from our customers