Home › Knowledgebase › KB-1147

Why Your Website is Hanging: Diagnosing PHP Memory Limits on Australian Shared Hosting

Summary

This guide helps you troubleshoot and resolve: Why Your Website is Hanging: Diagnosing PHP Memory Limits on Australian Shared Hosting. Follow the steps below to fix the issue.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

Common Causes

Shared hosting environments allocate a specific amount of server memory to every website hosted on the same physical machine. When your website attempts to use more memory than your plan allows, the PHP process may terminate abruptly. This typically results in slow loading times, intermittent crashes, or "white screen of death" errors. For small businesses in Australia, this often happens as traffic grows or as plugins and themes become more resource-intensive.

Quick Fix Steps

  1. Check your hosting control panel for current resource usage.
  2. Identify which plugin or script is consuming the most memory.
  3. Increase the PHP memory limit via your wp-config.php file or hosting dashboard.
  4. Monitor the site for stability over 24 hours.

Detailed Instructions

1. Monitoring Resource Usage

Log in to your hosting control panel and navigate to the resource usage or statistics section. Look for spikes in memory consumption that correlate with the times your website hangs. If you notice consistent peaks hitting your limit, your site has likely outgrown its current shared hosting allocation.

2. Checking Current PHP Memory Limit

Before making changes, verify your current memory limit:

  1. Log into your WordPress admin dashboard.
  2. Navigate to Tools > Site Health > Info.
  3. Expand the Server section and look for PHP memory limit.

3. Increasing the PHP Memory Limit (WordPress)

If your website runs on WordPress, you can attempt to increase the memory limit by editing your configuration file.

  1. Access your files via FTP or the File Manager in your hosting control panel.
  2. Locate and open the wp-config.php file in the root directory.
  3. Add the following line of code before the line that says /* That's all, stop editing! Happy publishing. */:
define( 'WP_MEMORY_LIMIT', '256M' );
  1. Save the file and refresh your website to see if the performance improves.
Tip: If you are not comfortable editing code files, you can request a memory limit increase by opening a ticket via the support portal.

4. Identifying Resource-Heavy Plugins

Sometimes a single poorly coded plugin is responsible for the bottleneck. To find the culprit:

  1. Log into your WordPress admin dashboard.
  2. Navigate to Plugins in the left-hand menu.
  3. Deactivate all plugins at once.
  4. Reactivate them one by one, testing the site speed after each activation.
  5. Once the site begins to hang again, the last plugin activated is likely the cause.

5. Checking Server Error Logs

Review your server error logs via your hosting control panel to confirm if PHP memory limit errors are being recorded. Look for messages such as "Allowed memory size exhausted" or "Fatal error: Out of memory".

Troubleshooting

Website Still Hanging After Memory Increase?

If increasing the memory limit does not resolve the issue, the problem may be related to server-side throttling or geographical latency. Shared hosting often implements "fair use" policies where the server slows down your account if it impacts other users on the same node.

Common Indicators of an Outgrown Plan

Caution: Avoid setting the memory limit excessively high (e.g., 1024M) on shared hosting, as the server may kill the process anyway if it exceeds the global hard limit set by the host.

If you have optimised your plugins and increased your memory limit but continue to experience unreliability, it may be time to migrate to a VPS or dedicated hosting environment. You can discuss upgrade options by visiting the support portal: Open a Ticket.

Still Having Issues?

Need more help? If the issue persists after trying these steps, please open a support ticket and our team will assist you.

💻 Open a Ticket