Updating WebForms
What it does
Installs a newer release of WebForms over the one you have. Your forms, submissions, emails and settings stay. The update can change how the database stores them, so you take a backup first, and you restore that backup if you need to go back. Coming from WebForms 3? See Moving to WebForms 4.
Before you start
- Command-line (SSH) access to the server where Magento runs, in the Magento root folder. If someone else manages your server, send this page to them.
- A backup of your store's database and files, made right before the update.
- A quiet time for the store. The store is offline for visitors while the update runs.
- If you can, try the update on a copy of your store first.
Steps
Run these commands in the Magento root folder on your server.
-
Put the store into maintenance mode:
bin/magento maintenance:enable -
Update WebForms, MageMe Core, and the theme package if you installed one:
composer update mageme/module-core mageme/module-webforms-base mageme/module-webforms-base-hyva mageme/module-webforms-base-breezeLeave out the Hyvä or Breeze package if your store doesn't use it. On Hyvä, always update the WebForms Hyvä package together with WebForms, to the same version. Add every other
mageme/module-webforms-…package your store has, such as add-ons, to the same command:composer show "mageme/*"lists them. Don't add--with-dependencies: it also updates the other packages WebForms depends on, which can bring a new major version of an unrelated module, such as a payment module, into your store. -
Update the database and the store's generated files:
rm -rf generated/code generated/metadatabin/magento setup:upgradebin/magento setup:di:compilerm -rf var/view_preprocessedbin/magento setup:static-content:deploy -fbin/magento cache:flush -
Open the store again:
bin/magento maintenance:disableOn Magento 2.4.9 with Magento's file cache, the last command of step 3 can leave some cached pages and settings in place. If the store still shows something from before the update, use Flush Cache Storage: see Old pages or settings stay after clearing the cache.
What you should see
- Content → WebForms opens, and Content → WebForms → Settings lists the installed MageMe packages.
- Your forms show on the storefront as before, and a test submission arrives in the Inbox.
Limits
- The update never removes your old data from the database. It copies what it needs into the new format and leaves the old data in place.
- Composer packages and the database change together. Going back to an older release means restoring both from your backup.
Troubleshooting
- Composer can't download the update, or asks for a password again. Enter your keys again, see Installation. If your support and updates period has ended, see Activate your license.
- Composer stops and names the Magento repository next to a MageMe package, for example that it "has higher repository priority". See Installation for the line to add to your store's Composer file.
- A database error about a missing column or table, although
setup:upgraderan. Runbin/magento setup:db:status: it says whether a module still waits for its database update. Check that every MageMe package was updated together:composer show "mageme/*"lists the installed versions, and a package left on an old version needs to go into thecomposer updatecommand of step 2. Then run the commands in step 3 again, in that order, andbin/magento cache:flush. - Something is wrong after the update. Put the store into maintenance mode, restore the database and files
from your backup, run
bin/magento cache:flush, and open the store again. Then contact MageMe support.
What's next
- Installation: the same commands for a first install.