Support » Fixing WordPress » fatal error – allowed memory size exhausted

  • Resolved dougkpga

    (@dougkpga)


    When I open the dashboard I get these messages –

    In wordpress development blog window this –

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 137535 bytes) in /home/websitep/public_html/wp-includes/wp-db.php on line 478

    In plugins window this –

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 44455 bytes) in /home/websitep/public_html/wp-includes/wp-db.php on line 478

    When I go to Plugins I get –

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home/websitep/public_html/wp-includes/kses.php(413) : runtime-created function on line 1

    I have manually installed wordpress 2.9.1 – overwritten the other files using ftp.

    I have extended the memory capacity of my hosting account to 500 M (used 111 M)

    This error has occurred after uploading several plugins.

    And the errors are preventing me getting to the plugin page.

    Please help.

    Thanks Doug

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Check with these options:

    1) Either rename/remove Plugins folder via FTP or disables all the Plugins from database. For that Refer this.

    2. If you have an access of PHP.ini file of the account/server then change the line in PHP.ini where line shows 32M to 64M:
    memory_limit = 64M; Maximum amount of memory a script may consume (64MB)

    3. If you do not have access of PHP.ini file then add this to an .htaccess file of your domain:
    php_value memory_limit 64M
    4. Try to add this line to your wp-config.php file to increase allocated memory to PHP:
    define(‘WP_MEMORY_LIMIT’, ‘64M’);

    If all this option can not resolve the issue then you need to contact your hosting service provider to resolve this issue.

    Thanks,

    Shane G.

    Looks like you need to address memory allocated to PHP.

    Methods for increasing the amount of memory a PHP script may consume

    1. If you have access to your PHP.ini file, change the line in PHP.ini
    If your line shows 32M try 64M:
    memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

    2. If you don’t have access to PHP.ini try adding this to an .htaccess file:
    php_value memory_limit 64M

    3. Try adding this line to your wp-config.php file:
    define('WP_MEMORY_LIMIT', '64M');

    4. Talk to your host.

    Thread Starter dougkpga

    (@dougkpga)

    Hi Michael and Shane,

    A BIG THANK YOU. (if you play golf let me know where to send you my golf book, I am a golf pro in australia)

    I tried 2 and 3 together because I didnt know where to find a PHP.ini

    I should have tried them separately because when I just did 3. alone it worked.

    2 and 3 together didn’t work.

    2. didn’t work.

    3. as below DID WORK….. ALL THANKS!!!!

    Anyway this is what I did in case anyone else has this problem…

    2. # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    php_value memory_limit 64M
    # END WordPress

    DID NOT WORK

    AND

    2. # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    php_value memory_limit 64M
    </IfModule>

    # END WordPress

    DID NOT WORK

    BUT THIS DID AS MICHAEL SUGGESTED….

    3. // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define(‘DB_NAME’, ‘name’);

    /** MySQL database username */
    define(‘DB_USER’, ‘name’);

    /** MySQL database password */
    define(‘DB_PASSWORD’, ‘pass’);

    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);

    /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’, ‘utf8’);

    /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’, ”);

    /**#@+
    * Authentication Unique Keys.
    *
    * Change these to different unique phrases!
    * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
    * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
    *
    * @since 2.6.0
    */
    define(‘AUTH_KEY’, ‘put your unique phrase here’);
    define(‘SECURE_AUTH_KEY’, ‘put your unique phrase here’);
    define(‘LOGGED_IN_KEY’, ‘put your unique phrase here’);
    define(‘NONCE_KEY’, ‘put your unique phrase here’);
    define(‘WP_MEMORY_LIMIT’, ’64M’);
    /**#@-*/

    /**
    * WordPress Database Table prefix.
    *
    * You can have multiple installations in one database if you give each a unique
    * prefix. Only numbers, letters, and underscores please!
    */
    $table_prefix = ‘fred_’;

    /**
    * WordPress Localized Language, defaults to English.
    *
    * Change this to localize WordPress. A corresponding MO file for the chosen
    * language must be installed to wp-content/languages. For example, install
    * de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German
    * language support.
    */
    define (‘WPLANG’, ”);

    /* That’s all, stop editing! Happy blogging. */

    /** Absolute path to the WordPress directory. */
    if ( !defined(‘ABSPATH’) )
    define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . ‘wp-settings.php’);

    [post edited to remove database details]

    Hi Doug,

    Not sure if those login details are your real ones.. but just incase they are [edited – thanks for catching it] would reccommend you remove the post at least (or change your login!)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘fatal error – allowed memory size exhausted’ is closed to new replies.