Month: September 2026

Activate maintenance mode for nextcloud from BASH command line

Sometimes, one wants to put a nextcloud installation into “Maintenance mode” from the command line. Assuming your nextcloud is installed in /var/www/nextcloud/, the following command will put it in maintenance mode:

sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on

The following command will deactivate maintenance mode:

sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off


(Last update on September 1, 2026 was done by Editor F.)

Activate maintenance mode for yourls from BASH command line

Sometimes, one wants to put a yourls installation into “Maintenance mode” from the command line. Assuming your yourls is installed in /var/www/example.com/x/, the following command will put it in maintenance mode:

touch /var/www/example.com/x/.maintenance

The following command will deactivate maintenance mode:

rm -f /var/www/example.com/x/.maintenance


(Last update on September 1, 2026 was done by Editor F.)

Activate maintenance mode for wordpress from BASH command line

Sometimes, one wants to put a wordpress installation into “Maintenance mode” from the command line. Assuming your wordpress blog is installed in /var/www/myblog.example.com/, the following command will put it in maintenance mode:

echo '<?php $upgrading = '"$(date +%s)"'; ?>' > /var/www/myblog.example.com/.maintenance

The following command will deactivate maintenance mode:

rm -f /var/www/myblog.example.com/.maintenance


(Last update on September 1, 2026 was done by Editor F.)