Skip to main content

Upgrading to Mixpost Enterprise from Pro

This guide ensures a smooth upgrade from the Pro to the Enterprise package, allowing you to fully benefit from the enhanced features of Mixpost Enterprise.

Backup database

Sometimes the upgrade can go wrong, so we recommend that you backup your database before starting the upgrade.

Upgrade to Enterprsie Using Docker

Upgrading to Mixpost Enterprise from Pro using Docker is straightforward. Ensure that you preserve the mounted volume during the process. Simply follow these steps:

  1. Open the folder that contains your docker-compose.yml file.
  2. In the docker-compose.yml file, replace the image inovector/mixpost-pro-team:latest with inovector/mixpost-enterprise:latest.

Then run:

# Pull the latest version
docker compose pull

# Stop and remove the old container
docker compose down

# Start a new container
docker compose up -d
info

If something goes wrong, you can use the inovector/mixpost-pro-team:latest tag to revert. Also, you need to restore your database backup.

Upgrade to Enterprise in a PHP Environment

This method applies if you have installed Mixpost Pro manually or within an existing Laravel application.

1. Delete the Pro package

composer remove inovector/mixpost-pro-team

May appear some error after removing. No need to do anything, just skip it.

Error on deleting Pro package

2. Install the Enterprise package

composer require inovector/mixpost-enterprise "^3.0" --with-all-dependencies

After installing the Mixpos Enterprise package, you may execute:

php artisan mixpost-enterprise:install

At the question Would you like to run the migrations now? (yes/no) answer with yes.

Next, it will ask you to create an admin user. If you already have one, you can cancel cancel the command.

To ensure that the assets get republished each time Mixpost Enterprise is updated, we strongly advise you to add the following command to the post-update-cmd of the scripts section of your composer.json.

"scripts": {
"post-update-cmd": [
# ...
"@php artisan mixpost-enterprise:publish-assets --force=true"
]
}

4. CSRF Protection

Exclude payment webhook handler route From CSRF protection by adding the URI */payment-webhook to the $except property of the VerifyCsrfToken middleware:

<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;

class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array<int, string>
*/
protected $except = [
'*/payment-webhook'
];
}

5. Modify the schedule command

In the console kernel app/Console/Kernel.php, you should remove \Inovector\Mixpost\Schedule::register($schedule) and add \Inovector\MixpostEnterprise\Schedule::register($schedule).

protected function schedule(Schedule $schedule)
{
// Remove or comment this command
# \Inovector\Mixpost\Schedule::register($schedule);

// Insert new command
\Inovector\MixpostEnterprise\Schedule::register($schedule);

$schedule->command('horizon:snapshot')->everyFiveMinutes();
$schedule->command('queue:prune-batches')->daily();
}

6. Clear the cache

php artisan route:clear
php artisan view:clear
php artisan mixpost:clear-services-cache
php artisan mixpost:clear-settings-cache

7. Optimize application

php artisan optimize

8. Terminate the Horizon process

php artisan horizon:terminate

Conclusion

Following the detailed steps, you have successfully upgraded from Mixpost Pro to Mixpost Enterprise. Keep your backups handy and monitor your system to maintain optimal performance.