WordPress: Fatal error: Allowed memory size of 67108864 bytes exhausted

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3200 bytes)

I edited the php.ini file to read as follows:

`

[PHP]

engine = On

zend.ze1_compatibility_mode = Off

short_open_tag = On

asp_tags = Off

precision = 14

y2k_compliance = On

output_buffering = 4096

zlib.output_compression = Off

implicit_flush = Off

unserialize_callback_func =

serialize_precision = 100

allow_call_time_pass_reference = Off

date.timezone = “America/Chicago”

safe_mode = Off

safe_mode_gid = Off

safe_mode_include_dir =

safe_mode_exec_dir =

safe_mode_allowed_env_vars = PHP_

safe_mode_protected_env_vars = LD_LIBRARY_PATH

disable_functions =

disable_classes =

expose_php = Off

max_execution_time = 43000

max_input_time = 120

memory_limit = 1024M

error_reporting = “E_ALL ^ E_NOTICE”

display_errors = On

display_startup_errors = Off

log_errors = Off

log_errors_max_len = 1024

ignore_repeated_errors = Off

ignore_repeated_source = Off

report_memleaks = On

track_errors = Off

html_errors = Off

variables_order = “GPCS”

request_order = “GP”

register_globals = Off

register_long_arrays = Off

register_argc_argv = Off

auto_globals_jit = On

post_max_size = 100M

magic_quotes_gpc = Off

magic_quotes_runtime = Off

magic_quotes_sybase = Off

auto_prepend_file =

auto_append_file =

default_mimetype = “text/html”

doc_root =

user_dir =

extension_dir=”D:stuck_out_tongue:HP5.3ext”

enable_dl = On

file_uploads = On

upload_max_filesize = 20M

max_file_uploads = 20

allow_url_fopen = On

allow_url_include = Off

default_socket_timeout = 6260000

upload_tmp_dir=”/home/******/tmp/”

session.save_path=”/home/******/tmp/”

error_log=”php-errors.log”

cgi.force_redirect=0

fastcgi.impersonate=1

fastcgi.logging=0

[Date]

[filter]

[iconv]

[sqlite]

[Pcre]

[Pdo]

[Pdo_mysql]

pdo_mysql.cache_size = 2000

pdo_mysql.default_socket=

[Phar]

[Syslog]

define_syslog_variables = Off

[mail function]

SMTP = smtpmailer.ezhostingserver.com

smtp_port = 25

; For Win32 only.

sendmail_from = server@secureC27.ezhostingserver.com

mail.add_x_header = On

[SQL]

sql.safe_mode = Off

[ODBC]

odbc.allow_persistent = On

odbc.check_persistent = On

odbc.max_persistent = -1

odbc.max_links = -1

odbc.defaultlrl = 4096

odbc.defaultbinmode = 1

;[Interbase]

;ibase.allow_persistent = 1

;ibase.max_persistent = -1

;ibase.max_links = -1

;ibase.timestampformat = “%Y-%m-%d %H:%M:%S”

;ibase.dateformat = “%Y-%m-%d”

;ibase.timeformat = “%H:%M:%S”

[MySQL]

;mysql.allow_local_infile = On

mysql.allow_persistent = On

mysql.cache_size = 2000

mysql.max_persistent = -1

mysql.max_links = -1

mysql.default_port =

mysql.default_socket =

mysql.default_host =

mysql.default_user =

mysql.default_password =

mysql.connect_timeout = 6260

mysql.trace_mode = Off

[MySQLi]

mysqli.max_persistent = -1

mysqli.allow_persistent = On

mysqli.max_links = -1

mysqli.cache_size = 2000

mysqli.default_port = 3306

mysqli.default_socket =

mysqli.default_host =

mysqli.default_user =

mysqli.default_pw =

mysqli.reconnect = Off

[mysqlnd]

mysqlnd.collect_statistics = On

mysqlnd.collect_memory_statistics = Off

[OCI8]

[PostgresSQL]

pgsql.allow_persistent = On

pgsql.auto_reset_persistent = Off

pgsql.max_persistent = -1

pgsql.max_links = -1

pgsql.ignore_notice = 0

pgsql.log_notice = 0

[Sybase]

sybase.allow_persistent = On

sybase.max_persistent = -1

sybase.max_links = -1

sybase.min_error_severity = 10

sybase.min_message_severity = 10

sybase.compatability_mode = Off

[Sybase-CT]

sybct.allow_persistent = On

sybct.max_persistent = -1

sybct.max_links = -1

sybct.min_server_severity = 10

sybct.min_client_severity = 10

[bcmath]

bcmath.scale = 0

[browscap]

[Informix]

ifx.default_host =

ifx.default_user =

ifx.default_password =

ifx.allow_persistent = On

ifx.max_persistent = -1

ifx.max_links = -1

ifx.textasvarchar = 0

ifx.byteasvarchar = 0

ifx.charasvarchar = 0

ifx.blobinfile = 0

ifx.nullformat = 0

[Session]

session.save_handler = files

session.use_cookies = 1

session.use_only_cookies = 1

session.name = PHPSESSID

session.auto_start = 0

session.cookie_lifetime = 0

session.cookie_path = /

session.cookie_domain =

session.cookie_httponly =

session.serialize_handler = php

session.gc_probability = 1

session.gc_divisor = 1000

session.gc_maxlifetime = 1440

session.bug_compat_42 = Off

session.bug_compat_warn = Off

session.referer_check =

session.entropy_length = 0

session.cache_limiter = nocache

session.cache_expire = 180

session.use_trans_sid = 0

session.hash_function = 0

session.hash_bits_per_character = 5

url_rewriter.tags = “a=href,area=href,frame=src,input=src,form=fakeentry”

[MSSQL]

mssql.allow_persistent = On

mssql.max_persistent = -1

mssql.max_links = -1

mssql.min_error_severity = 10

mssql.min_message_severity = 10

mssql.compatability_mode = Off

mssql.secure_connection = Off

[Assertion]

[COM]

[mbstring]

[gd]

[exif]

[Tidy]

tidy.clean_output = Off

[soap]

soap.wsdl_cache_enabled=1

soap.wsdl_cache_dir=”/tmp”

soap.wsdl_cache_ttl=86400

soap.wsdl_cache_limit = 5

[ldap]

ldap.max_links = -1

[mcrypt]

[dba]

[PHP_BZ2]

extension=php_bz2.dll

[PHP_CURL]

extension=php_curl.dll

[PHP_FILEINFO]

extension=php_fileinfo.dll

[PHP_GD2]

extension=php_gd2.dll

[PHP_GETTEXT]

extension=php_gettext.dll

[PHP_GMP]

extension=php_gmp.dll

[PHP_IMAP]

extension=php_imap.dll

[PHP_IMAGICK]

;extension=php_imagick_nts.dll

[PHP_INTL]

extension=php_intl.dll

[PHP_MBSTRING]

extension=php_mbstring.dll

[PHP_MYSQL]

extension=php_mysql.dll

[PHP_MYSQLI]

extension=php_mysqli.dll

[PHP_OPENSSL]

extension=php_openssl.dll

[PHP_PDO_MYSQL]

extension=php_pdo_mysql.dll

[PHP_PDO_ODBC]

extension=php_pdo_odbc.dll

[PHP_PDO_SQLITE]

extension=php_pdo_sqlite.dll

[PHP_PGSQL]

extension=php_pgsql.dll

[PHP_SOAP]

extension=php_soap.dll

[PHP_SOCKETS]

extension=php_sockets.dll

[PHP_SQLITE]

extension=php_sqlite.dll

[PHP_SQLITE3]

extension=php_sqlite3.dll

[PHP_TIDY]

extension=php_tidy.dll

[PHP_XMLRPC]

extension=php_xmlrpc.dll

[PHP_XSL]

extension=php_xsl.dll

[PHP_EXIF]

extension=php_exif.dll

[PHP_SQLSRV]

extension=php_sqlsrv_53_nts.dll

[PHP_PDO_SQLSRV]

extension=php_pdo_sqlsrv_53_nts.dll

[Zend]

zend_extension = “D:stuck_out_tongue:HP5.3extioncube_loader_win_5.3.dll”

zend_extension=”D:stuck_out_tongue:HP5.3extZendLoader.dll”

zend_loader.enable=1

zend_loader.disable_licensing=0

extension=geoip.so

wp-config.php file contains:

/* Increase WordPress Memory Limit*/

define(‘WP_MEMORY_LIMIT’, ‘1024M’:wink:;

Why am I getting this error still even though I specified memory allocation of 1GB?

  • Sajid
    • DEV MAN’s Sidekick

    Hi @BGF

    Hope you are doing good today :slight_smile:

    Try increasing the memory limit from 1024M to , 2048M or even 4096M. Also in most cases, on shared hosting specifically there is limit set by your hosting provider too. Make sure you hosting provide allows you to use that much dedicated memory.

    Have you installed any plugin that is causing this problem ? Try deactivating all plugins and then check if the error gone. If yes then activate your plugins one by one to find out the culprit.

    Check the log file to see why and which script is consuming that much of memory.

    And lastly contact your host and let see what they say about this issue :slight_smile:

    Cheers, Sajid

  • BGF
    • The Incredible Code Injector

    Thank you!

    1) My allocated hosting memory is 1024MB (Godaddy Pro cPanel Unlimited). Does that figure mean I have access to 1024MB allocated to me or 1024MB shared across all on the shared hosting wit restrictions for each domain? I will ask them but from your experience, what is normally the case?

    2) The culprits: WPMUDEV Updates/Dashboard, Popup Pro

    3) Important: If I specified 1024MB why does the error say “Allowed memory size of 67108864 bytes exhausted?”

    @sajid

  • Sajid
    • DEV MAN’s Sidekick

    Hi @BGF

    Hope you are doing good today and you are welcome :slight_smile:

    1) My allocated hosting memory is 1024MB (Godaddy Pro cPanel Unlimited). Does that figure mean I have access to 1024MB allocated to me or 1024MB shared across all on the shared hosting wit restrictions for each domain? I will ask them but from your experience, what is normally the case?

    On shared hosting, you will never have dedicated memory or space. There are number of other users using same server and sharing the resources.

    2) The culprits: WPMUDEV Updates/Dashboard, Popup Pro

    I am using these both plugins and I have set the memory limit define(‘WP_MEMORY_LIMIT’, ‘128M’:wink:; its working perfectly fine for me.

    3) Important: If I specified 1024MB why does the error say “Allowed memory size of 67108864 bytes exhausted?”

    It means its ignoring the memory limit specified in your php.ini file. Have you tried alternate method adding the memory limit in wp-config.php or .htaccess file ?

    Add below code in wp-config.php:

    define('WP_MEMORY_LIMIT', '1024M');

    Add below in .htaccess file:

    php_value memory_limit 1024M

    If its still not changing then you have to talk with your hosting to increase the memory limit.

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.