Upgrading Easy Forms - First steps - Easy Forms

# Upgrading Easy Forms ¶

## Introduction ¶

This document describes how to upgrade your Easy Forms application from 1.x to 1.4.1.

If you encounter errors during this process:

1. Note any error messages you see (take a screenshoot or copy your logs).
2. Restore your site to its previous state, using the file and database backups you created before you started the upgrade process. Do not attempt to do further updates on a site that had upgrade problems.
3. Contact us via our support page on CodeCanyon.

> Note: All directories mentioned in this document are relative to your Easy Forms installation directory.

## Upgrade Steps ¶

1. Make a full backup of files, directories, and your database before starting, and save it outside your Easy Forms installation directory.
2. Remove all old files and directories, except the followings:
   - `config/db.php`: Stores the database configuration.
   - `static_files/uploads`: Stores files uploaded by your users when they submit their forms.
   - `static_files/images/avatars`: Stores your registered users' avatars.
   - Any custom directories and files you added elsewhere.
3. If you made modifications to files like `.htaccess` or `robots.txt` or `config/params.php`, you will need to re-apply them from your backup, after the new files are in place.
4. Upload the latest Easy Forms release to your Easy Forms directory, except for the following files and directories:
   - `config/db.php`
   - `static_files/uploads`
   - `static_files/images/avatars`
5. Re-apply any modifications to files such as .htaccess or robots.txt or config/params.php and set up directory permissions (only directories).

6. Run update script by visiting http://www.example.com/update (replace www.example.com with your domain name). This will update the database tables. But if you are unable to access the update script, do the following:

   - Open `config/web.php` with a text editor.
   - Find the line that say: `// 'update' => ['class' => 'app\modules\update\Module'],`
   - Uncomment this line by removing the ‘//’ characters. `'update' => ['class' => 'app\modules\update\Module'],`
   - Try to run the update script again.
   - Once the update is done, this line must be commented out.

7. Try to run the update script again and make sure that the ‘Page not found’ message is displayed.

And that’s it! The upgrade is now complete. Your upgraded Easy Forms application is now ready to use. Enjoy!

> Note: It is always recommended try an upgrade on a test copy of your site before applying it to your live site. Even minor updates can cause your site's behavior change.