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.
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
- Check your hosting control panel for current resource usage.
- Identify which plugin or script is consuming the most memory.
- Increase the PHP memory limit via your
wp-config.phpfile or hosting dashboard. - 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:
- Log into your WordPress admin dashboard.
- Navigate to Tools > Site Health > Info.
- 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.
- Access your files via FTP or the File Manager in your hosting control panel.
- Locate and open the
wp-config.phpfile in the root directory. - Add the following line of code before the line that says
/* That's all, stop editing! Happy publishing. */:
define( 'WP_MEMORY_LIMIT', '256M' );
- Save the file and refresh your website to see if the performance improves.
4. Identifying Resource-Heavy Plugins
Sometimes a single poorly coded plugin is responsible for the bottleneck. To find the culprit:
- Log into your WordPress admin dashboard.
- Navigate to Plugins in the left-hand menu.
- Deactivate all plugins at once.
- Reactivate them one by one, testing the site speed after each activation.
- 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
- Frequent 500 Internal Server Error messages.
- Database connection errors during peak traffic hours.
- Slow admin dashboard response times.
- Timeouts when uploading large media files.
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?
💻 Open a Ticket