cancel
Showing results for 
Search instead for 
Did you mean: 

How to show a maintanance page or coming soon page in front of a live magento 2 page

SOLVED

How to show a maintanance page or coming soon page in front of a live magento 2 page

Hi,

I have a live site, I need to edit the front page design for christmas special design, Is there any way to put  "we will back soon" message or something related to this in front of the page?

Any help will be apreciated

 

Thanks and Regards 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to show a maintanance page or coming soon page in front of a live magento 2 page

you can simply enable maintenance mode or you can create custom page for coming soon page.

Step 1 - Create an under Construction HTML page

Create an index.html under construction page
Upload this page to your root magento directory
(you have already made that backup, right>?)

Step 2 - Update your .htaccess file

Add the following line to the top of your .htaccess file in the root directory of your magento installation

DirectoryIndex index.html index.php

Also, upload this file to your root magento directory
(rest assured if anything goes wrong, you’ve got that backup!)
This tells the system to use your index.html file before the index.php, this is essential, otherwise your site will show as usual.

Step 3 - Test your front end and continue working

Your frontend should now show the under construction / maintenance page.
To continue working on your site, simply navigate to your frontend and add /index.php
e.g.
www.yourdomainname.com - goes to the under construction HTML page
www.yourdomainname.com/index.php - goes to your website for development purposes
Once everything is backup and running, simply add a hash (#) to the command line in your htaccess file:
#DirectoryIndex index.html index.php
 

View solution in original post

3 REPLIES 3

Re: How to show a maintanance page or coming soon page in front of a live magento 2 page

Hello @megha_pd

 

Please run below command to enable maintenance mode:

php bin/magento maintenance:enable

or create .maintenance.flag file under var folder.

 

For more infor please follow below reference:

https://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-subcommands-maint.html

 

To Disable delete that file from var folder or run below command:

php bin/magento maintenance:disable

 

Manish Mittal
https://www.manishmittal.com/

Re: How to show a maintanance page or coming soon page in front of a live magento 2 page

Hi @megha_pd

 

As @Manish Mittal mentioned you can enable or disable the maintenance mode.

 

If you want to edit the content that's displayed while maintenance mode is enabled you can edit pub/errors/default/503.phtml this file.

 

Re: How to show a maintanance page or coming soon page in front of a live magento 2 page

you can simply enable maintenance mode or you can create custom page for coming soon page.

Step 1 - Create an under Construction HTML page

Create an index.html under construction page
Upload this page to your root magento directory
(you have already made that backup, right>?)

Step 2 - Update your .htaccess file

Add the following line to the top of your .htaccess file in the root directory of your magento installation

DirectoryIndex index.html index.php

Also, upload this file to your root magento directory
(rest assured if anything goes wrong, you’ve got that backup!)
This tells the system to use your index.html file before the index.php, this is essential, otherwise your site will show as usual.

Step 3 - Test your front end and continue working

Your frontend should now show the under construction / maintenance page.
To continue working on your site, simply navigate to your frontend and add /index.php
e.g.
www.yourdomainname.com - goes to the under construction HTML page
www.yourdomainname.com/index.php - goes to your website for development purposes
Once everything is backup and running, simply add a hash (#) to the command line in your htaccess file:
#DirectoryIndex index.html index.php