How to put my shop in maintenance mode without access to my back office?

HelpCenter

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:

  1. Access your FTP server or hosting via a file manager.
  2. Open the following file:app/config/parameters.php
  3. Look for the line that contains:

    'maintenance_mode' => false,
  4. Modify this line to change it totrue :

    'maintenance_mode' => true,
  5. 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.

  1. Log in to phpMyAdmin or another database management tool.
  2. Access the table.ps_configuration.
  3. Search for the row that corresponds to.PS_SHOP_ENABLE.
  4. Modify the value:
    • If it is at.1This means that the shop is active.
    • Change it to0 to deactivate it (put it in maintenance).
  5. 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:

  1. Create a text file namedmaintenance.html on your computer.
  2. 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>
    
  3. Upload this file to the root of your site via FTP (where the file is located).index.php).
  4. Temporarily configure your web server to display this file instead of the site. This option requires adjusting the file.htaccess or 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.

 

⚠️ This article has been translated by a machine translation program.