PickBazar Documentation
WelcomeHow It Works
Prerequisite
Installation
Available Scripts & Command
How Can I use this app
Demo Deploy
Features
Settings
Payment
Flash Sale
Shop Transfer
Social LoginOTP (Mobile Number Verification)WalletEmail ConfigurationEmail VerificationSubscribeTerms and conditions
SEO and Analytics
Refund
Real-time Notification
Multilingual & Translation
Third-party Integrations
Deployment
Back-End Integration
Customizations
Update & Upgrade Guide
Laravel UpgradeHow to upgrade the existing deployed laravel 9 server to laravel 10?VPS UpdateExisting Project Update
FAQ PageContactQuestion & AnswerBreaking ChangesSupportChange Log

How to upgrade the existing deployed laravel 9 server to laravel 10?

You can check older laravel version upgrade guides here

At first, remove all the existing php 8.0 and its extensions by using this command,

sudo apt purge php8.0-fpm php8.0-mysql
sudo apt purge php8.0-mbstring php8.0-xml php8.0-bcmath php8.0-simplexml php8.0-intl php8.0-mbstring php8.0-gd php8.0-curl php8.0-zip composer

Then remove the composer,

sudo rm /usr/bin/composer

Then delete the vendor folder from the pickbazar-laravel -> api folder.

cd /var/www/pickbazar-laravel/api
sudo chown -R $USER:www-data storage
sudo chown -R $USER:www-data bootstrap/cache
rm vendor -rf

Then install PHP 8.1, and its extensions,

sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.1-fpm php8.1-mysql
sudo apt install php8.1-mbstring php8.1-xml php8.1-bcmath php8.1-simplexml php8.1-intl php8.1-gd php8.1-curl php8.1-zip php8.1-gmp
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e21205b207c3ff031906575712edab6f13eb0b361f2085f1f1237b7126d785e826a450292b6cfd1d64d92e6563bbde02') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/bin/composer

Then update 8.0 fpm to 8.1 fpm from,

/etc/nginx/sites-enabled/pickbazar

sites-enabled.png

Make sure you didn’t introduce any syntax errors by typing:

sudo nginx -t

Next, restart Nginx:

sudo systemctl restart nginx

Then install composer packages,

cd /var/www/pickbazar-laravel/api
composer install
php artisan optimize:clear
php artisan marvel:install

php artisan marvel:install will remove all of your existing data. Ensure you export or backup your data before using that command.

sudo chown -R www-data:www-data storage
sudo chown -R www-data:www-data bootstrap/cache