Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20480 bytes)

Add the following at the top of wp-config.php: ini_set(‘memory_limit’,’128M’); Although you should use WP_MEMORY_LIMIT when you can, we see in /wp-includes/default-constants.php that WordPress doesn’t do much more than use ini_set itself. Note: This is just one more thing to try, but you’ll likely end up having to have your host fix this issue.

Syntax of FS_CHMOD_DIR and FS_CHMOD_FILE

The basic syntax for define() is: define ( $name, $value ) In the above definition, the value is: ( 0755 & ~ umask() ) The ‘&’ (ampersand) is the ‘And’ bitwise operator, the ‘~’ (tilde) is the ‘Not’ bitwise operator, and the umask() function returns the current umask. To answer your question in short (if … Read more

How to use live images on local install?

Try to filter the output URLs temporarily to replace them with online images, using the following code: add_filter( ‘wp_get_attachment_image_src’, function ( $image, $attachment_id, $size ) { // For thumbnails if ( $size ) { switch ( $size ) { case ‘thumbnail’: case ‘medium’: case ‘medium-large’: case ‘large’: $image[0] = str_replace( ‘localhost/’, ‘EXAMPLE.COM/’, $image[0] ); break; … Read more

Missing a temporary folder despite settings in wp-config.php

try to use get_temp_dir() to see if wordpress is using your WP_TEMP_DIR constant. i’ve tried this code in wp-config.php and it works define(‘WP_TEMP_DIR’, dirname(__FILE__) . ‘/wp-content/temp/’); but you have to put it before the /* That’s all, stop editing! Happy blogging. */ in your wp-config.php file.