3.Upgrade v2.x -> v3.x
before you do anything – and unless you have absolutely nothing to lose – you are STRONGLY ADVISED TO MAKE A FULL BACKUP OF YOUR SITE AND DATABASE. There is absolutely no way back other than restoring your backup if it goes wrong for some reason !!! No, seriously, overwriting the plugin files with an old version WILL SIMPLY NOT WORK
Furthermore, it might also be a good idea to copy your current site to a test environment somewhere, run the updates as outlined below to make sure nothing untoward happens when doing this on your actual site (or indeed, do all updates in a test environment and then transfer this one back to the real thing perhaps using commonly available cloning/duplication/backup plugins)
Important: when upgrading from 2.x to 3.x any Templates set in
WPPizza -> Templates (Email and Print) will be reset to the default. Unfortunately there is no practical way of transferring those to the new version. Additionally the old default template has been retired due to too many issues and inconsistencies. Only drag/drop templates that were introduced quite some time ago are now available.
If you have used/added/customised/edited any of these templates, I would suggest you make screenshots of your settings to be able to reproduce these reasonably easily after updating WPPizza
Before updating, unless you have done so already, please also enable debug as follows which will help in tracking down any issues :
edit your wp-config.php you will find a line/constant that reads
define('WP_DEBUG', false); and REPLACE this with
define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);
directly underneath that line so the whole codeblock now reads
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);
It would also not be a bad idea to increase the default allocated memory of 40MB by wordpress to something more suitable (let’s say 128mb) by adding the following to the wp-config.php too.
define( 'WP_MEMORY_LIMIT', '128M' );
although on a reasonably basic site it should work/upgrade quite happily with the default 40MB if you have lots of plugins running etc, you might run out of memory. So I would say “Better safe than sorry”.
Furthermore I would suggest you also check your
max_execution_time in your php.ini. If you just have a basic non-multisite environment, your default of – probably – 30 seconds might well be fine. However, in a multisite setup or on slow servers 30 seconds might not be enough as a lot of db updates/upgrades have to be done (in a multisite environment on all sites).
Again, as it is better to be safe than sorry, perhaps it might be a good idea to increase your max_execution_time to something higher for the purpose of upgrading (600 being 10 minutes – probably a bit overkill, but for this brief period of time it should be fine. Just reset it to what it was when you are done).
To do that, add
to your wp-config.php as well (before /* That’s all, stop editing! Happy blogging. */) to cover for extreme server slowness or to allow for a big multisite setup
Once the upgrade has been done, you can delete that line again
(alternatively you can also edit the php.ini directly editing the line that says
max_execution_time = 30to
max_execution_time = 600, just revert to what it was after the upgrade)
Updating – Step by Step
- make sure your current wppizza install has been updated to the latest version of the v2.x branch ( at least v184.108.40.206 or higher – you can get v2.x versions from the bottom of this page here)
if you have not saved/updated your
WPPizza->Additivesfor a while, save them once – just to make sure. If you are using a multisite/network setup you should do this for every site in the network that uses the plugin.
*UPDATE* all WPPizza related extensions/plugins/gateways but NOT the main WPPizza plugin yet.
(Note: For premium extension licenses that have expired in the last 6-8 months or so, I am happy to extend the validity period to be able to download the updated extensions that have been updated to work with WPPizza version 3.x. Just contact me with your license key when updates of premium extensions are being marked as being available for wppizza version 3.x – see the changelog of each extension at wp-pizza.com/extensions or wp-pizza.com/gateways)
- De-Activate – NOT uninstall – ALL your updated WPPizza related plugins/extensions/gateways (but not the main WPPizza plugin)
- update your WPPizza version v2.x to WPPizza version 3.x just like you would update any other wordpress plugin (i.e de-activate WPPizza, overwrite files with new version, re-activate or simply click on “update” in your WordPress plugins page)
- depending on your previous setup, you *might* have to click on a couple of things (or simply reload the page you are on a 2-3 times ), before all WPPizza sublinks/pages/pagedetails will show up again
- depending on your setup, you *might* also have to put the cart/cartwidget/cart shortcode back onto a/the page(s) or sidebar(s) if it should have disappeared for some reason – although I tried to make sure as much as possible that this is not going to be the case. So if some wppizza widgets should have gone missing put them back to where they were (double check your sidebars / widget areas)
check – if it was enabled previously – that the COD gateway is still enabled in
WPPizza -> Gateways. If not, simply re-enable and save.
- If everything so far has been going to plan and you had no fatal errors / site not working etc , i would suggest you delete the debug.log ( [path-to-your-site]/wp-contents/debug.log ) as it will no doubt have been filled with some – inconsequential – php notices. It will simply be regenerated after deletion but will now be clean of these one-off notices/warnings
Now Re-Activate ONLY the WPPizza extensions/plugins/gateways THAT ARE MARKED AS BEING WPPIZZA v3.x COMPATIBLE. Again, see changelog of each plugin/extension/gateway if it has been updated for v3.x. (As of writing this, and for a variety of reasons, only the Korta Gateway is not yet updated for compatibility with v3)
For your convenience, a list of minimum extension versions required for WPPizza v3.x compatibility. Make sure you have at least the below versions of these extensions if you want to use them with WPPizza 3.x.
- Add Ingredients Extension v5.0+
- Delivery By Post/ZipCode v4.0+
- Timed Menu v2.0+
- Preorder v2.0+
- Coupons and Discounts v2.0+
- Google Cloudprint v4.0
For “Gateways” please see the individual changelog of your particular gateway here as to from which version onwards it has been made compatible with WPPizza v3.x
If you are using the “Delivery by Post/Zipcode plugin, go to
WPPizza -> Post/Zipcodes -> Settings[Tab]check “Verify table column” and save once.
WPPizza->Gatewaysand re-enable the gateways you want to use (individual settings should not have been affected, but double check anyway I would suggest). If no gateway is enabled no checkout button will be shown and nobody will be able to order from your shop – unless that’s what you want.
WPPizza->Order Form Settings. Many text options have been added. You should especially check these (and edit if necessary) if your set language is NOT english as not all new strings will yet be available in your language and will therefore default to english.
- if you had it entered before, you will unfortunately have to re-enter your license keys for each re-enabled extensions / gateway , though entering it is still optional of course.
- many css classes have changed. furthermore some element structures have been amended for consistency throughout. so if you have customised the css somwhat, I would perhaps suggest to make a backup of your custom css somewhere and remove all of that customisation as you might find some is either not necessary anymore , do nothing at all or perhaps will even do things to elements you do not intend. If you now find you do again need to re-apply some of the customisation to the css use your browsers element inspector to identify the new/relevant element and add your css again (perhaps referring to the backup of the customisation you have taken and simply now using the new/relevant element class or id)
- Finally I would advise you to thoroughly test things , play with things, make some test orders, have a look at the options available in the admin etc etc(check your wp-content/debug.log too and let me know if there’s anything wppizza related there , even if it seemingly does not affect the functionality of your site)
Optionally, if you are happy with it all, you can also set debug to false again like so
or leave it running for a bit in case you come across some issues at some point further down the line.
If you have also changed your
max_execution_timein your php.ini or set the
set_time_limit(600)in the wp-config.php, I’d suggest you change it back to what it was before the plugin update
Hopefully, once you had a chance to get to know the changes to the plugin, you will agree that this update is worth the effort of jumping through all the hoops above to upgrade.
As ever, if you have any questions or problems, let me know via the contact form giving me as much info as you can.
Thanks for using WPPizza
If – for some reason – you did not follow the upgrade instructions above (perhaps you have some plugin running that automatically updates all plugins indiscriminately) and your site is now not working anymore (either partially or at all), all is not lost. To start off – do/try the following.
if you get a fatal error along the lines of ‘PHP Fatal error: Class ‘WPPIZZA_GATEWAY_gateway_selected’ not found’ make sure you use at least v3.0.1 of the plugin. As your site will not be accessible with a fatal error, simply download the latest version of the plugin and overwrite the plugin files – using ftp probably. Doing so should at least give you access to your site back. Then:
– check the gateways (re-enable the ones you need if necessary, double check settings)
– check and re-save your additives (to be save)
you should now at least be up and running again
you will however need to re-apply/add any template (changes) you made previously and your customisations as outlined previously on this page
alternatively – if that is an option – you could of course simply restore your last backup and do the update as intended following the guide above
again, contact me if you need help. I am aware that there may of course be issue with such a big update as i cannot possibly test all variations of sites/plugins etc beforehand. I will do my best to help in those circumstances though
documentor id 1