Github Build: 2020-10-11 - 9795f12 env: production



CI4 Conversion Script

#1: Plan to update from CI3 to CI4 (FOR Ubuntu VPS)
 
#2: Localhost: - Prepare Localhost Locations - I use the following paths:
/var/www/CodeIgniter4/
/var/www/ci4-strict/
 
#3: Command Box - select path, clear previous version and Clone Source
  1. cd /var/www/
  2. sudo Rm -Rf CodeIgniter4
  3. git clone https://github.com/codeigniter4/CodeIgniter4.git
  4. sudo chmod -Rf CodeIgniter4/writable
 
#4: Browser - test that CI4 downloaded version works OK
Browse to: http://localhost/CodeIgniter4/public/
 
#5: System File Browser: - copy CodeIgniter4 Source to path ci4-strict
Highlight the following files and copy to /var/www/ci4-strict/
  1. /var/www/CodeIgniter4/app
  2. /var/www/CodeIgniter4/public
  3. /var/www/CodeIgniter4/system
  4. /var/www/CodeIgniter4/writable
  5. /var/www/CodeIgniter4/.emv
  6. /var/www/CodeIgniter4/.htaccess
  7. /var/www/CodeIgniter4/
  8. /var/www/CodeIgniter4/README.md
 
OR
 
#6: Command Box - copy CodeIgniter4 Source to path ci4-strict
cd /var/www/
sudo mkdir /ci4-strict
sudo chmod -Rf 0777 ci4-strict
cp -r CodeIgniter4/app ci4-strict/app
cp -r CodeIgniter4/app ci4-strict/app-new
cp -r CodeIgniter4/public ci4-strict/public
cp -r CodeIgniter4/system ci4-strict/system
cp -r CodeIgniter4/writable ci4-strict/writable
cp -r CodeIgniter4/.env ci4-strict/env
cp -r CodeIgniter4/.htaccess ci4-strict/.htaccess-ORIGINAL
cp -r CodeIgniter4/README.md ci4-strictREADME.md
cp -r CodeIgniter4 ci4-strict
sudo chmod -Rf 0777 ci4-strict/writable
 
#7: Browser - test that ci4-strict works OK
Browse to: http://localhost/ci4-strict/public/
 
#8: Command Box - Create RSYNC shortcut ot Upload files to server
rsync -avz /var/www/ci4-strict/ -e ssh root@123.45.67.89:/var/www/ci4-strict.tk/
 
#9: Browser - test that ci4-strict works OK
Browse to: https://ci4-strict.tk/
 
 


#1: Steps to convert from CI3 to CI4 (FOR Ubuntu VPS)
Once the welcome_message is showing:
  1. Amend app/Config/Routes.php and add following:
  2. $routes->add('/new_page', 'Home::new_page');
  3. Amend app/Controllers/Home.php and add following:
  4. public function new_page()
    {
    return view('new_page');
    }
  5. Add a new View:
  6. app/Config/Views/new_page.php
  7. This is the new_page
 




HTML: Validator CSS: Validator Support: Captain Tom Moore