Help with http error 503 notification page for WP site
-
My site crashed after trying to update some plugins. I had a backup but am still having problems after the restore.
For the moment I want to show a notification page. I did some searching and came up with this suggested code for my 503.php page to show three headers:
header(“HTTP/1.1 503 Service Temporarily Unavailable”); header(“Site Down for Maintenance, Status: 503 Service Temporarily Unavailable”); header(“Retry-After: SOME_TIME_INTERVAL”);
I also wan to display the company logo and office phone number. It would be nice if I could style the text information at least a little bit.
To show the company logo, I tried putting copy of the logo.jpg file on the site root and adding an echo line after those headers, for example:
<blockquote>echo "<img src='logo.jpg' /></blockquote>
I don’t know php much, but I read I should not use multiple echo lines to add the text information, but rather “concatenate” it in the one echo line.
I tried something like this:
echo "<img src='logo.jpg . "Company phone 555-1212";
I don’t have php installed but I tried serving the code on a localhost from vscode. It shows the headers (including the word header) separated by semicolons and also displays the image (preceded by the word echo) and the “concatenation” dot with the text in parentheses and the terminating code semicolon.
OK, I know that isn’t accurate but it looks like a start.
Then, I found a suggestion to add some lines to the .htaccess file at the bottom that essentially redirects any user trying to access the domain to the notification and excludes my own IP address so I can still acces the site to try to fix it.
the added lines were as follows:
RewriteEngine on RewriteCond %{REMOTE_ADDR} !^10\.10\.99\.54 /*fake: my actual external IP address*/ RewriteCond %{REQUEST_URI} !/503.php$ [NC] RewriteRule .* /503.php [R=302,L]
I must confess I have no idea what that code is actually doing.
When the site crashed, my client freaked because they had just signed up over 200 new customers for their business services – and the site was down.
I immediately put up the bare notification without more. I don’t really want to use a plugin for this, and I hope I can have the site back up in a day or so.
My client asked me to at least put the company logo and phone contact information on the page.
I used a VPN to see how it was working. When I typed in the company domain I got the bare notice. Now I want to add the logo and company phone, but the code is not showing as I expected.
I’m seeing this on the browser screen:
header(“HTTP/1.1 503 Service Temporarily Unavailable”); header(“Site Down for Maintenance, Status: 503 Service Temporarily Unavailable”); header(“Retry-After: 86400”); echo "
I’m not seeing either the logo or the phone information text at all.
- This topic was modified 2 years, 7 months ago by .
- This topic was modified 2 years, 7 months ago by .
- This topic was modified 2 years, 7 months ago by . Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
The page I need help with: [log in to see the link]
- The topic ‘Help with http error 503 notification page for WP site’ is closed to new replies.