• I am creating and testing WP site on localhost (WP2.9.1, SlidingDoor theme) and fatal error appears whenever I add/upload media/files. Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 261900 bytes) in C:\xampp\htdocs\wordpress\wp-includes\functions.php on line 1953.

    I tried every suggestion in the forum to increase memory limit (ie. php.ini, .htaccess, wp-settings.php, wp-config.php, image.php…). I even inflated the values to 1000M in couple of the .php files. Tried deactivating plugins. Also tried different media (1kb jpegs, 20kb pdfs…) and the problem still exists.

    Any ideas and suggestions would be greatly appreciated. My WP site provides a lot of pdfs for visitors to download, so especially important to solve this. Is there any way to bypass this problem? Thanks in advance.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Im not an expert but I had that problem before. I contacted my hosting company and they fix it. Tell ’em your problem.

    Thread Starter macdull888

    (@cma8888)

    Thanks for your feedback but I am creating and testing my site on localhost so the site is not online yet (as mentioned in original post). In that case, is there something that I can tweak in the server files since the files are stored locally on my computer?
    Any help would be much appreciated. Anyone?

    Increase the memory limit in php.ini

    See here for configuration file locations.
    https://www.apachefriends.org/en/xampp-windows.html#1172

    Thread Starter macdull888

    (@cma8888)

    Thanks but tried that too (as in original post). Increased the value to 5000M, still the same problem.

    Sorry… guilty of skimming …

    The error is being generated by a WordPress function that creates directories, perhaps there’s a permissions issue that’s causing it to error…

    Do you have an uploads directory? If not, create it, if so, check the permissions..

    Thread Starter macdull888

    (@cma8888)

    I have no complaints, t31os. Just glad that good people like yourself are offering help.
    I do have an uploads directory. Folder is read-only by default. Uncheck read-only option and applied changes. The setting returned to checked state. Doesn’t seem to allow user to change permission.

    I don’t have this problem locally myself, so i’m out of ideas..

    Perhaps try re-creating the folder, as an idea… (it might not help at all)

    I had a similar problem and it works after making wp-content/* writable.

    I had a similar problem and it works after making wp-content/* writable.

    I had the same problem and it works now after changing wp-content/* to writable.

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Memory exhausted in functions.php when add media’ is closed to new replies.