Custom maintenance page breaks module install process
Be sure to add the $content variable in the template even though you customized some texts in your template file. A sample would be:

&lt;?php if ($content): ?&gt;
&lt;h1&gt;&lt;?php print $content; ?&gt;&lt;/h1&gt;
&lt;?php else: ?&gt;
&lt;h1&gt;Offline due to an unknown issue. Our engineers are working on it 24/7 to resolve this.&lt;/h1&gt;
&lt;?php endif; ?&gt;


Apparently, Drupal limits/locks access to the database during module/theme install, thus triggering the maintenance-page--offline.tpl.php. Take note that if you don't have the mentioned file, it will trigger maintenance-page.tpl.php.