Maintenace Mode with CLI

Maintenace Mode with CLI

Gabriel Fernández -
Atsakymų skaičius: 4

Hello,

Bluehost upgraded to PHP 7, and our Moodle installation is 2.8. So we cannot login. I'm trying to migrate the database and MoodleData to a local server with PHP 5.5 to extract the resources.

However, I need to place Moodle in maintenance mode using CLI. But the shared hosting won't allow me to use sudo for obvious security reasons.

Is there another way to place Moodle in maintenance mode?

Pažymių vidurkis: -
Atsakymas į Gabriel Fernández

Re: Maintenace Mode with CLI

Visvanath Ratnaweera -
Particularly helpful Moodlers paveikslėlis Translators paveikslėlis
The documetation says
$ sudo -u apache /usr/bin/php admin/cli/maintenance.php --enable

I think doing it as any user who has read permissions in the moodle directory tree will work:
$ /usr/bin/php admin/cli/maintenance.php --enable