Statamic Upgrade (v4)Once complete you may now upgrade to Statamic v5 and laravel v10 here.

These are the main steps for our older Statamic sites. However if you’re not comfortable or something has gone amiss please follow the full guides below

Laravel - https://laravel.com/docs/9.x/upgrade

Statamic - https://statamic.dev/upgrade-guide/3-4-to-4-0

config.json

Required Packages

php to ^8.2

laravel/framework to ^9.0

statamic/cms to ^4.0

Require Dev Packages

nunomaduro/collision to ^6.1

spatie/laravel-ignition to ^1.0

Config

platform-check to false

Other

minimum-stability to stable

app > Http > Middleware > TrustProxies.php

<?phpnamespace App\Http\Middleware;use Illuminate\Http\Request;use Illuminate\Http\Middleware\TrustProxies as Middleware;class TrustProxies extends Middleware{    /**     * The trusted proxies for this application.     *     * @var array     */    protected $proxies;    /**     * The headers that should be used to detect proxies.     *     * @var string     */    protected $headers = Request::HEADER_X_FORWARDED_FOR |                            Request::HEADER_X_FORWARDED_HOST |                            Request::HEADER_X_FORWARDED_PORT |                            Request::HEADER_X_FORWARDED_PROTO |                            Request::HEADER_X_FORWARDED_AWS_ELB;}

Then run composer remove fideloper/proxy or remove the line from composer.json