upgrade() public static method

This script triggers any necessary upgrades. If the site has been upgraded to the most recent version of the code, no upgrades are run but the caches are flushed. Upgrades use a table {db_prefix}upgrade_lock as a mutex to prevent concurrent upgrades. The URL to forward to after upgrades are complete can be specified by setting $_GET['forward'] to a relative URL.
public static upgrade ( ) : void
return void
Example #1
0
<?php

$autoload_path = __DIR__ . '/vendor/autoload.php';
$autoload_available = (include_once $autoload_path);
if (!$autoload_available) {
    die("Couldn't include '{$autoload_path}'. Did you run `composer install`?");
}
\Elgg\Application::upgrade();