> ## Documentation Index
> Fetch the complete documentation index at: https://help.hoopai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Navigating unique error codes in WordPress hosting

> Understand and resolve common WordPress hosting error codes in the HoopAI platform, including 500, 502, 503, and 504 errors, database issues, memory limits, and plugin conflicts.

If you host a WordPress site through the HoopAI platform and encounter HTTP error codes, this guide helps you identify the root cause and apply the appropriate fix. Most WordPress errors fall into a few well-known categories.

***

## 500 Internal server error

A 500 error is a generic server-side failure. In WordPress, it is most commonly caused by:

<AccordionGroup>
  <Accordion title="Corrupted .htaccess file">
    A broken `.htaccess` file is the most frequent cause of 500 errors. To fix it:

    1. Access your site files via the Hoop file manager or SFTP
    2. Rename `.htaccess` to `.htaccess_backup`
    3. Reload your site — if the error is resolved, the file was the issue
    4. Go to **Settings > Permalinks** in WordPress and click **Save Changes** to regenerate a clean `.htaccess` file
  </Accordion>

  <Accordion title="PHP memory limit exceeded">
    If your site runs out of memory, PHP crashes with a 500 error. Increase the memory limit by adding the following line to your `wp-config.php` file:

    ```php theme={null}
    define('WP_MEMORY_LIMIT', '256M');
    ```

    Save the file and reload your site.
  </Accordion>

  <Accordion title="Plugin or theme conflict">
    A recently activated plugin or theme update can trigger 500 errors. Rename the `wp-content/plugins` folder to `wp-content/plugins_disabled` via the file manager to deactivate all plugins at once. If the site loads, re-enable plugins one at a time to identify the offending plugin.
  </Accordion>
</AccordionGroup>

***

## 502 Bad gateway

A 502 error means the web server received an invalid response from an upstream process (typically PHP).

<Steps>
  <Step title="Check for PHP process crashes">
    This often indicates a PHP fatal error. Check the **Error Logs** section in your Hoop WordPress hosting dashboard for recent PHP errors.
  </Step>

  <Step title="Increase PHP execution time">
    If a script is taking too long, the PHP process may be terminated. Add the following to `wp-config.php`:

    ```php theme={null}
    set_time_limit(300);
    ```
  </Step>

  <Step title="Restart the PHP process">
    In your Hoop hosting dashboard, navigate to **Site Settings > PHP** and click **Restart PHP**. This clears stale processes that may be causing the upstream failure.
  </Step>
</Steps>

***

## 503 Service unavailable

A 503 error indicates the server is temporarily unable to handle requests. Common causes in WordPress:

| Cause                   | Solution                                                                                                                                                            |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Maintenance mode active | WordPress enters maintenance mode during updates. If an update was interrupted, delete the `.maintenance` file from the WordPress root directory                    |
| Server resource limits  | High traffic or resource-intensive plugins can exhaust server capacity. Consider upgrading your Hoop hosting plan or enabling a caching plugin                      |
| Cron job overload       | Poorly configured WP-Cron tasks can stack up and consume resources. Add `define('DISABLE_WP_CRON', true);` to `wp-config.php` and set up a real server cron instead |

<Warning>
  If a 503 error persists for more than 15 minutes and you have not made any recent changes, contact Hoop support. A prolonged 503 may indicate a server-level issue that requires platform intervention.
</Warning>

***

## 504 Gateway timeout

A 504 error means the server did not receive a timely response from an upstream process. This is common during:

* Large database queries on pages with complex content
* Plugin operations that make external API calls (e.g., backup plugins, SEO crawlers)
* Bulk import or export operations

<Steps>
  <Step title="Identify the slow operation">
    Check which page or action triggers the 504. If it happens on specific admin pages, a plugin on that page is likely causing the delay.
  </Step>

  <Step title="Deactivate heavy plugins temporarily">
    Disable plugins related to backups, migration, or real-time analytics. Reload the page to see if the timeout resolves.
  </Step>

  <Step title="Optimize the database">
    Use a database optimization plugin or run `OPTIMIZE TABLE` queries on large tables. Bloated `wp_options` and `wp_postmeta` tables are frequent causes of slow queries.
  </Step>
</Steps>

***

## Database connection errors

If you see **"Error establishing a database connection"**, the issue is between WordPress and the MySQL database:

1. Verify the database credentials in `wp-config.php` match the values in your Hoop hosting dashboard under **Database Settings**
2. Check whether the database server is running — go to your Hoop hosting dashboard and look for the database status indicator
3. If the database has exceeded its storage quota, you may need to clean up unused data or upgrade your hosting plan

<Info>
  A corrupted database table can also cause connection-like errors. If credentials are correct but the error persists, use phpMyAdmin (available in your Hoop hosting dashboard) to run a **Repair Table** operation on the `wp_options` table.
</Info>

***

## PHP version issues

WordPress and its plugins require specific PHP versions. Running an incompatible version can cause errors ranging from blank pages to fatal crashes.

* WordPress 6.x requires PHP 7.4 or higher (PHP 8.1+ recommended)
* Check your current PHP version in **Hoop Hosting Dashboard > Site Settings > PHP Version**
* If a plugin requires a newer PHP version, update the version in the dashboard and test your site immediately

<Tip>
  Before changing the PHP version, create a backup of your site through the Hoop hosting dashboard. Some older plugins are not compatible with newer PHP versions and may break after the update.
</Tip>
