Demanding applications like WordPress with WooCommerce or PrestaShop often require higher PHP memory limits. Here is how to configure them:
Method 1: DirectAdmin / cPanel PHP Selector
- Log in to your hosting control panel.
- Go to Select PHP Version → Options tab.
- Locate
memory_limitand select your desired value (e.g., 256M, 512M, 1024M). - Optionally adjust
upload_max_filesizeandpost_max_sizeas needed. - Settings are applied instantly without server restarts.
Method 2: Custom .user.ini file
Create or edit a .user.ini file in your website's document root (public_html) and add:
memory_limit = 512M
max_execution_time = 300
upload_max_filesize = 64M
post_max_size = 64M