WordPress Fatal error: Allowed memory size of {N} bytes exhausted (tried to allocate {N} bytes)

The default allocated memory to any WordPress site can vary on your settings either at the system level (PHP Configurations) or how you set it up in WordPress.

When you get this kind of error ( Allowed memory exhausted), that means that your WordPress may no longer work with memory that’s allocated to it.

The only option would be to increase the memory limit.

There are multiple ways of doing it, but let me show you the easiest one

Open your wp-config.php file

If you have a line something similar to this

Then you will have to edit the above line and change 64M to say 256M

Basically what we are doing is to allow WordPress to use up to 256 MB system memory. Now if your system’s memory + pagecache doesn’t allow this expansion, you will need to add more memory to your server else you may potentially get other errors such as segmentation fault etc

Administration area requires much more memory to do things than that of your normal site pages, so if you put the setting below in your wp-config file, this will overwrite the WP_MEMORY_LIMIT when you are in doing tasks in WP admin area.


I hope this helps

Braintree\Exception\SSLCertificate with braintree_php sdk

Ok so I scratched my head around this for a while to figure out why would this happen There are several reasons The request URL was malformed. (This was ok in my case, I've logged each request and didn't see any issues) The request was an … [Continue reading]

NodeJS How to determine or check for current OS (Operating System)

There are two ways of doing it, First using the native OS module, Check out the API function available for OS module here https://nodejs.org/dist/latest-v5.x/docs/api/os.html#os_os_platform  Basically, all you have to do is to call platform() … [Continue reading]

PHP check if search engine bot

How do you check if your website is being crawled by a bot or spider, or in case you want to expose a certain section or sections of your website to the search engines which otherwise would be hidden from them as they are protected … [Continue reading]

Ionic 2+ How to access parent navController

There could potentially be scenarios when you will have something like this [crayon-5bc915d5b1f04378202456/] Each of ion-nav components have their own NavController, when you try to push or pop a view, depending on the inheritance level of your … [Continue reading]

PHP: Check if Start of each word in a sentence is uppercase or any part of a word is UPPERCASE

When working with strings, occasionally we would want to check if any part of a word is uppercase or start of a word is an uppercase letter. This post provide a generic function that can be extended to match your needs. For this post I will use … [Continue reading]

How to convert a string to equivalent integer value based on ASCII codes in Javascript

Hi Guys, Here is a quick tip if you would like to convert a string into a sum of ASCII codes for all characters Function you can use For ES5: [crayon-5bc915d5b2d49526047110/] We can do equivalent in ES6 … [Continue reading]

Hunspell with PHP on Windows – Part 1

Ok so I hear you saying, how the hell can I use Hunspell and PHP with Windows, Now the way I am going to show you isn't the only way but is a much simpler way without compiling and using binaries. What is Hunspell? Well I can re-write what's … [Continue reading]

PHP Start of the day and End of the day for a timezone Util functions

This is a quick post where I am sharing a couple of functions to calculate start of a given day and end of the day for a given timezone Start of the day [crayon-5bc915d5b3c5c793087300/] End of the … [Continue reading]

[Solved] bootbox.js show ajax html data inside the dialog

Hi Guys Just a quick one here if you are using a library called bootbox.js in your project. This library does not make ajax request automatically if you wish to load some data from your server to show within your dialog window. Instead, you can do … [Continue reading]