Site icon PrestaShop | Magento | CRM Modules

Prestashop how to put the website in maintenance mode and allow access to specific IP addresses.

Gotcha 👍 PrestaShop makes this pretty straightforward, and you don’t need any module for it.

Here’s the clean, official way to put your site in maintenance mode while allowing specific IP addresses.


Method 1: From Back Office (Recommended)

Step 1: Enable Maintenance Mode

  1. Log in to Back Office
  2. Go to
    Shop Parameters → General
  3. Find Maintenance
  4. Set:
    • Enable shop → ❌ No
    • Maintenance IP → add allowed IPs (explained below)
  5. Click Save

Your shop is now in maintenance mode.


Step 2: Allow Access by IP Address

In the Maintenance IP field:

Example:

49.36.123.45, 103.21.44.8

Only these IPs will see the website normally.
Everyone else sees the maintenance page.


Step 3: Find Your IP Address

From your own computer:

If your IP changes often, add your office network IP or ISP range.


Method 2: Allow Access via config file (Advanced)

If you’re locked out of Back Office or want a fallback:

  1. Open:
/config/defines.inc.php
  1. Find:
define('_PS_MODE_DEV_', false);
  1. Maintenance mode is controlled by:
/app/config/parameters.php   (PS 1.7+)

But IP whitelisting is best handled from Back Office, not here.


Customize Maintenance Page (Optional)

To edit the maintenance message:

/themes/your-theme/templates/errors/maintenance.tpl

Common Gotchas ⚠️

âś” Clear cache after enabling:

Advanced Parameters → Performance → Clear cache

âś” If using Cloudflare / CDN, your real IP may be hidden
→ Add Cloudflare IP ranges or enable “Restore Visitor IP”

✔ Mobile data IP ≠ Wi-Fi IP
→ Add both if needed


 

Exit mobile version