Migrating to v2022

If you are an existing PHPMaker user (using version older than v2019), before upgrading to v2019 (or newer), please read Migrating to v2019 first.v2019 uses Composer to manage required third party packages. If you are not familiar with Composer, please read Introduction - Composer first. You may also want to read:
Re-Introducing Composer, the Cornerstone of Modern PHP AppsMake sure that you enable PHP CLI and install Composer, see System Requirements → Composer for details.To use Composer, please make sure that you are online during the generation process.

After the first generation, Composer will download all the required packages, it may take a long time, please be patient. Later generation will not run “composer update” again unless you enable/disable some features that require third party packages.

Note: The packages downloaded by Composer are put in the “vendor” subfolder under the destination folder of your project. Make sure you upload this “vendor” subfolder to your site together with other generated files.Also read Composer for more information about configuration of local PHP processor.

PHPMaker 2020 is a huge upgrade from v2019, it includes a long list of new features. However, if you upgrade from version prior to v2019, please be reminded that v2019 introduced some new features which are not fully compatible with old versions, make sure you read the Migrating to v2020 first.

PHPMaker 2021 is another huge upgrade from previous version, it includes a long list of new features. However, if you upgrade from version prior to v2019, please be reminded that v2019 introduced some new features which are not fully compatible with old versions, make sure you read Migrating to v2019 and Migrating to v2020 first. When you open an old project in v2021, PHPMaker will try to convert the changes for you. However, the conversion cannot be 100% and you’ll need to do some updates yourself. Please read the Migrating to v2021 carefully, review your code, update and test it before deploying the new scripts to your production server.

PHPMaker 2021 requires URL Rewrite.

If you use Apache web server, check phpinfo(), search for ‘mod_rewrite’. If it is enabled you should see it as ‘Loaded Modules’. If not, open httpd.conf (Apache Config file) and look for:

#LoadModule rewrite_module modules/mod_rewrite.so

Remove the pound (‘#’) sign at the start and save the file. Restart your Apache server. Check phpinfo() and search for ‘mod_rewrite’ again. You should be able to find it now.Some users report that their Apache servers requires RewriteBase directive:You may check your .htaccess at the project folder, the content should be like:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

If your server requires RewriteBase, you need to add one more line, e.g.a. If you generate to root folder of your site,

RewriteEngine On
RewriteBase /
...(omitted)...

b. If you generate to a subfolder (e.g. “demo2021”) of your site,

RewriteEngine On
RewriteBase /demo2021/
...(omitted)...

If your server requires this setting, you can click Tools → Advanced Settings and set “RewriteBase directive”, e.g. / or /demo2021/, then generate .htaccess files again. Note that there are 2 .htaccess files, one under the project folder, the other under the “api” subfolder.Make sure your virtual host is configured with the AllowOverride option so that the .htaccess rewrite rules can be used. Open your httpd.conf or apache.conf in a text editor, and locate the section and change the AllowOverride line to:

AllowOverride All

Also read URL Rewrite for more information about other web servers.

PHPMaker 2022 is another huge upgrade from previous version, it includes a long list of new features. If you upgrade from v2021, there are no big changes.

When opening an old project in v2022, PHPMaker will try to convert the changes for you. However, the conversion cannot be 100% and you’ll need to do some updates yourself.Please read Migrating to v2022 carefully, review your code, update and test it before deploying the new scripts to your production server.We have updated Composer and URL Rewrite to include more information. If you are still not familiar with Composer or URL Rewrite, please read them first.If you upgrade from an older version prior to v2019, please be reminded that v2019-2021 introduced some new features which are not fully compatible with old versions, make sure you read the following first:
Migrating to v2019
Migrating to v2020
Migrating to v2021