• WordPress crashes my server after an hour or two after the server is up and running. I need a way to stop the site from working so that I can backup important data.

    Is there a way to disable/stop/shutdown a website?
    Will editing some values (like database) in the wp-config.php to incorrect ones help stop WordPress?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Marius L. J.

    (@clorith)

    Hi,

    To “stop” a site on a server, you would usually just remove the servers VirtualHost entry for the site (this is the web server software definition of a site on the server).

    Thread Starter Nathan Yiangsupapaanontr

    (@dobadiary)

    Hi Marius,

    Sorry, I forgot to mention that this is a shared hosting.

    please install a .maintenance file.

    Using a plain text editor, create a new file and add this to it:

    <?php $upgrading = time(); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml">
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>Maintenance</title>
    </head>
    <body style="background-color: green">
    <h2>Site Maintenance Is being Performed</h2>
    <h2>Some Downtime is necessary - look back soon</h2>
    <h2>Thanks!</h2>
    </body>
    </html>
    <?php die(); ?>

    Note: only this is actually required:

    <?php $upgrading = time(); ?>
    <?php die(); ?>

    but the example given .maintenance file example will give folks a clue as to what to do now. Once that file is in place, wait a bit and then proceed to update site using backend (FTP).

    Thread Starter Nathan Yiangsupapaanontr

    (@dobadiary)

    Will give it a try.
    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to shutdown a WordPress website?’ is closed to new replies.