1. Log in to your DirectAdmin account.
For instructions on how to log in to your DirectAdmin account, please click here.
2. Under System Info & Files, click File Manager.
3. Go to the directory of your WordPress installation (most commonly under public_html). Whilst in the directory of your WordPress installation directory, create a file called “.maintenance “.
To do this, click the Create text file icon on the left.
4. From the options provided, click Plain Text.
5. Name the file .maintenance.
6. Once created, right-click the .maintenance file, then click Edit.
7. Paste the following code into the file and click the Save button.
<?php
$upgrading = time();
?>
8. Once saved, this will put your website into maintenance mode. Anyone visiting the page will see the message below:
9. If you wish to customise this message, return to File Manager. Go to the directory of your WordPress installation (most commonly under public_html), then double-click on the wp-content folder.
Create a new file called "maintenance.php" in the wp-content folder.
10. You can edit this file and add HTML/CSS/XML coding to display your customised maintenance page.
For example, the following code:
<html>
<head><title>Offline for maintenance</title></head>
<body>
<h2 style="text-align: center;">Sorry, we're currently offline for scheduled maintenance.
We'll be back soon!</h2>
<p style="text-align: center;"><img src="https://example.com/wp-content/uploads/2021/12/clouds.jpg" width="900" height="700" /></p>
</body>
</html>
Will display the following maintenance page:
Note: This code is just an example and will not display the customised maintenance page above if copied and pasted, as you will need to make adjustments to the code and reference an actual image within your file manager.