PHP Error: Allowed Memory Size of x Bytes Exhausted

SShaltai-Boltai April 26, 2026 2 min read 0 views


If you are getting an error such as "Allowed memory size of... in file /directory/folder/yourscript.php", you can use an htaccess file to resolve this problem.

If the error does not go away even after applying the htaccess code, you should contact us. We will do our best to help you.


Place this code in the dot htaccess file of your primary domain. If the error persists after using the code, enter it in the directory where you are receiving the error, such as example.com/directory/folder/.htaccess.

Add this code to your htaccess file:

RLimitMem max

//RELATED ARTICLESALL ARTICLES →
April 26, 2026 2 min read 0

How to Forcefully or Gracefully Shut Down the VPS in SolusVM 2

You can shut down the VPS in two ways - forcefully or gracefully in SolusVM 2. How to Gracefully shut down the VPS in SolusVM 2? 1. Log in to your SolusVM 2 Control Panel. 2. Under Projects, click on the project that contains your VPS. 3. Click on the appropriate VPS. 4. Click on Stop.5. Click Ye...

SShaltai-Boltai Read more
April 26, 2026 2 min read 0

How to Reboot/Restart VPS in SolusVM 2

You can restart VPS via the command line or SolusVM 2. How to Reboot/Restart a VPS via SolusVM 2? 1. Log in to your SolusVM 2 Control Panel. 2. Under Projects, click on the project that contains your VPS. 3. Click on the appropriate VPS. 4. Click on Restart located at the top right side.5. Choose...

SShaltai-Boltai Read more
April 26, 2026 2 min read 0

How to Check if Your VPS is Online or Offline in SolusVM 2

You can check the status of your SolusVM Virtual Private Server (VPS) to see if it is online or offline. You can find out VPS status from the client area or from the SolusVM 2 Control Panel.1. Log in to your SolusVM 2 Control Panel. 2. Under Projects, click on the project that contains your VPS. ...

SShaltai-Boltai Read more
April 26, 2026 2 min read 0

How to Log in to SolusVM 2 Control Panel

You can find the Control Panel URL, username (email address), and password in your VPS welcome email. SolusVM 2 login details example: Control Panel URL: https://server-hostname/login or use the IP address.Username: Your email address.Password: Your password. How to log in to SolusVM 2 Control Pa...

SShaltai-Boltai Read more