Suspending Unpaid Hosting Customers

It’s common practice, that if you don’t pay your web hosting services then your website will be suspended. I’m going go over the technicals of how I handle website suspensions for my customers.

The majority of unpaid customers aren’t aware anything is wrong.

It doesn’t matter how many emails are sent, if the customer thinks everything is paid up they will ignore these real suspension notices. I’ve accepted that fact and have begun more regularly suspending unpaid customers. 

Suspending WordPress with a must-use plugin.

When taking a site offline, it’s important that the re-enabling is quick and painless. My preferred method is adding a custom, must-use plugin which can deactivate the front-end of the site. Whenever a payment is made, restoring the site is as simply as removing the custom must-use plugin.

Example of what the must-use plugin displays on the entire frontend.

The following is code for the file captaincore_deactivated.php, which is intended to be placed under wp-content/mu-plugins/. Feel free to use and modify.

<?php

function captaincore_template_redirect() { ?><html>
  <head>
		<meta charset="utf-8">
		<title>Website Deactivated</title>

		<!-- Compiled and minified CSS -->
		<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">

		<!-- Compiled and minified JavaScript -->
		<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>

		<style>
				@import url('https://fonts.googleapis.com/css?family=Roboto');
				body {
					text-align: center;
					margin: 10% auto;
					padding: 0%;
					font-family: 'Roboto', sans-serif;
					overflow: hidden;
					display: block;
					max-width: 450px;
					background: #eeeeee;
				}
				p {
					margin-top: 3%;
					line-height: 1.4em;
					display: block;
				}
				img {
					margin-top: 1%;
				}
				a {
					color:#27c3f3;
				}
		</style>
  </head>
  <body>
				<div class="row">
		<div class="col s12">
		  <div class="card">
				<div class="card-content">
										<span class="card-title">Website Deactivated</span>
												<p>This website is no longer active.</p>
				</div>
								<div class="card-content grey lighten-4">
										<p>Site owners contact <a href="https://anchor.host">Anchor Hosting</a></p>
								</div>
		  </div>
		</div>
  </div>


		</body>
</html>

<?php

  die();

}
add_action( 'template_redirect', 'captaincore_template_redirect' );