When I update my WordPress site; The site will be temporarily unavailable to users and a text will be displayed stating that the site has been updated.
I am looking for a code so that I can change the display text and also display an image to the user.
I don’t know any code or solution for this issue and I searched for such code but didn’t find anything.
I need any kind of help or guidance.
Thank you in advance.
2
Answers
Is there any type of video/screenshot you can show in order to further help you?
Make sure to replace ‘https://example.com/path/to/your/image.jpg’ with the URL of the image you want to display, and ‘The site is currently undergoing maintenance. Please check back soon.’ with your custom maintenance mode message.
After adding this code to your theme’s functions.php file, save the file, and the custom maintenance mode page will be displayed to non-admin users whenever the site is being updated. Admin users, who have the capability to edit themes, will still be able to access the site normally.
Remember to remove or comment out this code once you no longer need the maintenance mode functionality to allow regular access to your site.