Blesta Guides tips

Upgrade to Blesta 5.0.0

So you would like to upgrade from Blesta 4.x.x to 5.0.0? It's pretty easy however because it's a big upgrade you need enough upload and execution time in PHP to do so.

 

If you have any issues trying to write please try: 

sudo command-for-php

If you can access your PHP.ini you can set these values:

post_max_size = 128M
upload_max_filesize = 128M
max_execution_time = 1000
memory_limit = 512M

To find your php.ini on SSH use the command: 

php --ini

Before we start the best version of MYSQL and MariaDB are required else you will run into issues to find your version run:

mysql -V

You need at least: MySQL 5.7.7 or MariaDB 10.2.2

 

If that's all good let's get started, go to your folder where Blesta is stored mostly in:

cd /var/www/html/

Now it's time to get the zip from Blesta do the following:

wget -N https://account.blesta.com/client/plugin/download_manager/client_main/download/172/blesta-5.0.0.zip

Let's unzip the new version:

unzip blesta-5.0.0.zip

Let's remove any conflicting files (Not everyone edits these):

rm -rf ./blesta/config/routes.php

Copy everything from the new blesta folder to your current folder:

\cp -rf ./blesta/* ./

Time to give permissions if the user isn't root (example: apache):

\chown apache: ./*
\chown apache: ./.htaccess

Sometimes you may need to provide 777 permissions to config (This is only required if your FTP username is different to the file / folders owner):

chmod 777 ./config/
chmod 777 ./config/blesta.php

Finally it's time to upgrade Blesta:

php ./index.php admin/upgrade

You'll see this message:

----------------------------------------
Blesta CLI Upgrader
----------------------------------------
Upgrade from 4.12.1 to 5.0.0? (Y/N): 

Just put in Y and wait until it's finished:

----------------------------------------
Blesta CLI Upgrader
----------------------------------------
Upgrade from 4.12.1 to 5.0.0? (Y/N): Y
16/16 [========================================] 100%
24/24 [========================================] 100%
16/16 [========================================] 100%
6/6 [========================================] 100%

Finished.

Let's tidy up:

rm -rf ./blesta-5.0.0.zip
rm -rf ./LICENSE
rm -rf ./README.md

Well done you have upgraded your Blesta to the latest version.

Michael Dance
Back to Blog