Here are several methods to activate maintenance mode without access to the back office:
Method 1: Through the configuration file
For PrestaShop versions starting from 1.7:
- Access your FTP server or hosting via a file manager.
- Open the following file:
app/config/parameters.php -
Look for the line that contains:
'maintenance_mode' => false,
-
Modify this line to change it to
true:'maintenance_mode' => true,
-
Save the file and reload the store: it will now be under maintenance.
Method 2: Via the database
It is a risky technique to use as a last resort, if you cannot modify the files.
- Log in to phpMyAdmin or another database management tool.
- Access the table.
ps_configuration. - Search for the row that corresponds to.
PS_SHOP_ENABLE. - Modify the value:
- If it is at.
1This means that the shop is active. - Change it to
0to deactivate it (put it in maintenance).
- If it is at.
- Save your changes.
| ⚠️ Regularly back up your database, avoid modifying it if you do not have a recent backup. |
Method 3: Via FTP, when you do not have access to anything else.
If you cannot access either the administration or the configuration files, you can do this:
- Create a text file named
maintenance.htmlon your computer. -
Write a simple message such as:
<html> <head><title>Maintenance en cours</title></head> <body> <h1>La boutique est temporairement en maintenance</h1> <p>Merci de revenir dans quelques instants.</p> </body> </html> - Upload this file to the root of your site via FTP (where the file is located).
index.php). - Temporarily configure your web server to display this file instead of the site. This option requires adjusting the file
.htaccessor the server configuration, depending on your hosting.
⚠️ This operation is not recommended for beginners..htaccess is not recommended for beginners. Always back up your .htaccess file before modifying it. |