IFTT to update .htaccess to turn off php on receiving resource usage warning email

This idea is to help the community and prevent their sites from shutting down from resource usage warning

So I had this idea, and I couldn’t see anyone else tried it before so i don’t know where we would even start

so here the scenario

it’s 5am and you get an email saying resource usage warning , 5 mins later your site is suspended for 24 hours because you couldn’t react fast enough.

instead of only having 5 mins (if you’re awake) to respond to the warning email before they shut your site down for 24 hours .

What if an app automaticity copy a version of .htaccess to your FTP for your site which has php_flag off (turns off php on your site)

Maybe use IFTTT ?

or raspberry pie ?

another solution is to limit the php useage with code like below, but infinityFree won’t tell us our limit. because is “confidential” … nor how to restart it after midnight.

/* Memory limit (50Mb) */
$mem_limit = 52428800;

Ideas and suggestion are welcome, =)

I think you’re on to something, but I do have a few comments.

First of all, disabling PHP creates some really big security problems. Say, for example, you disable PHP processing on your WordPress site. If someone now navigates to your site /wp-config.php, they now see the PHP code of the file printed in their browser, which includes your database credentials, encryption keys and other data you definitely shouldn’t share.

And if you have a dynamic site, then disabling PHP effectively takes your entire site down, because even the more static pages would not be rendered anymore. In which case you might as well IP blocklist your entire site. But if your entire site is down, then what do you gain compared to your account being suspended?

Ideally, you would push the site in some kind of cached or statically generated read-only mode. But that’s easier said than done.

Also, please note that while you can restrict some things in individual PHP scripts, the limits we calculate are based on the usage of your entire account. If at 5 AM a spam bot starts to hammer your website, restricting the resource use of individual scripts is not going to do anything to save your site.

Finally, while restricting memory usage in PHP is possible, restricting CPU usage is not possible, and Entry Process and hits usage is largely or completely unrelated to the use of individual scripts.


I have one comment, it’s kind of related:

Rather than the suspendeddomain.org being where you get redirected to when your site is suspended, maybe add the option to choose your own suspended site (Obviously not your website that has been suspended) but maybe like your status page. Either that or a nicer page which actually says ‘This site has been suspended’ because i’m sure people have gone to a suspended website, been redirected to suspendeddomain.org and thought what is this site? (and also because then they get about a thousand pings because their anti-virus software is going mad).

Just a suggestion :slight_smile:


I like this idea too but that means they wouldn’t get free advertising on our site

Thats true…

That’s exactly what I used to do if I can respond fast enough, but now I don’t need to even respond fast because I can manage within these limits.

Just use below inside .htaccess to shutdown website for a while

#Temporary shut website
Order deny,allow
Deny from all

1 Like

Are you serious? how would it help them at all?

That shd conserve resource usage until website is accessible

It wouldn’t shut the site down, it would just deny access.

1 Like

U r right. Deny access and hopefully conserve resources at the same time

This shd take it offline


RewriteEngine On
RewriteBase /
Redirect 410 /

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.