Because our webhoster changed the support for php, i have to find a way to do an upgrade without damaging the running website.
The plan:
- create a linux host as a vm
- install mysql, apache2, php
- import the backups
The second step was not that simple:
add-apt-repository ppa:ondrej/phpImporting the data into the database was easy (Before i did a backup via the contao frontend: system -> backup database).
apt install mysql-server apache2 php5.6 php5.6-mysql
mysql -u root -pYOURPASS -e "create database mydb"From the live system i copied everything into /var/www/html and changed the user to www-data:
mysql -u root -pYOURPASS mydb < database.backup.sql
cd /var/www/htmlLast step is the customizing of /var/www/html/system/config/localconfig.php
chown -R www-data *
$GLOBALS['TL_CONFIG']['dbHost'] = 'localhost';And after a last command
$GLOBALS['TL_CONFIG']['dbUser'] = 'root';
$GLOBALS['TL_CONFIG']['dbPass'] = 'YOURPASS';
$GLOBALS['TL_CONFIG']['dbDatabase'] = 'mydb';
systemctl restart apache2i was able to open the website via a local firefox with http://localhost/index.php.
Now a snapshot a damaged installation after an upgrade can be rolled back without any problem ;-)
EDIT:
ReplyDeleteYou have to install php5.6-gd as well. Otherwise php is not able to resize pictures...
Great delivery. Solid arguments. Keep up the good work.
ReplyDeleteRegards for helping out, good information.
ReplyDeleteThanks for this post, I am a big fan of this internet site would like
ReplyDeleteto proceed updated.