Taking website from local development to online installation

Tips submitted by PHPMaker users
Post Reply
SRanade
User
Posts: 95

Taking website from local development to online installation

Post by SRanade »

I've recently struggled with transfer of website from local development to online use. Here is the workflow that worked best. I hope it is of help for new users!

  1. Enable: Tools / Advanced Settings / Log Error to File. This will allow you to debug problems during transfer.
    You may also enable Debug, though I did not need it as the code was working find locally. See: viewtopic.php?f=18&t=49192

  2. Generate all scripts with F9

  3. In Windows, right click on your local project folder and Add to Archive. Create a Project.ZIP file of the entire project. (RAR format does not work if you are want to transfer to Apache installation).

  4. Go to your cPanel / File manager and browse to YourWebsite.com folder. Upload Project.ZIP. Right click and Extract. This will create the project folder as YourWebsite.com/Project/
    (If you need you can unzip in the root, but for security purposes it is advisable to put in sub-folder and make it work in the root by changing .htacess settings, as needed.)

  5. Browse to Project/src/ and find the file: config.production.php OR config.development.php depending on your compile setting in Tools / Advanced Settings / Environment. Edit the file to put the correct values in Databases for User and Password. If you don't know what to put, go to your cPanel / MYSql Databases and create new user / password , assign full rights and Add User to Database. I prefer to create a separate user/password for each Project for security reasons.

  6. Now load YourWebsite.com/Project/ in browser. If you are lucky it should work. If not check the log file in the Project folder for the error message.
    a) if you get error "Prepared statement needs to be re-prepared" then change Tools / Advanced Settings / MySQL Driver to pdo_mysql or vice-versa. See: viewtopic.php?f=4&t=49169
    b) Although in almost all cases you will not need it, some installations need to change Tools / Advanced Settings / RewriteBase Directive to "/Project/". See: https://phpmaker.dev/doc/tools.htm#custom
    In my case I needed to change to pdo_mysql, but RewriteBase Directive was not needed.

Good luck!


jbalbas
User
Posts: 24

Post by jbalbas »

Please note I use PHPmaker, and I hope that my comment is applicable to this other product of e-World.

Consider using a compare-and-update program that supports FTP or sFTP, partial update of the development area is easy (and convenient).

Saludos desde México,
José Balbás


Post Reply