Home

How to Increasing WordPress Memory Limit!

Last updated on April 16th, 2025

Method 1: Using an FTP

Using an FTP client like FileZilla is one way to change the .htaccess or wp-config.php file. Before starting either of the steps below, make sure FileZilla is linked to the FTP account for your website.

  1. Find the .htaccess file in the root directory or public_html folder of the website.
  1. To open the file in the text editor, right-click on it and select View/Edit.
View Edit
  1. Search the line:
code:
# END WordPress
  • Under that line, write the given code:
php_value memory_limit 256M
PHP Value Memory Limit
  1. After saving the modifications, close the editor.
  1. When FileZilla prompts to upload the modified file, click Yes, then refresh the site.

Method 2: Using a File Manager

Increase the WordPress memory limit by editing the .htaccess or wp-config.php file using the built-in File Manager of your hosting account.

1. Log in to Your Web Hosting Control Panel :

  • Go to your hosting account (e.g., cPanel, Plesk, DirectAdmin).
  • Open the File Manager.
File manager

2. Locate the wp-config.php File :

  • Navigate to your WordPress installation directory (usually public_html or a subfolder like public_html/yourdomain.com).
  • Look for the file named wp-config.php.
WP config PHP

3. Edit the wp-config.php File :

  • Right-click on wp-config.php → choose Edit or Code Editor.
  • Scroll down to find the line:
php:
/* That's all, stop editing! Happy publishing. */
  • Just above this line, add the following code:
php:
define('WP_MEMORY_LIMIT', '256M');
  • You can replace 256M with any other value depending on your hosting plan, e.g. 128M, 512M, 1024M, 2048M etc.

 4. Save the Changes :

  • Click Save Changes or Save File in the editor.