Translator

Farscan Blog Topics

Farscan Subscriptions

Archives

Facebook

Farscan on Facebook

Resolving Wordpress memory exhaustion

Here are some tips for curing the memory allocation errors WP Users may see from various modules when they try to edit, preview or publish a post.

“Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 500001 bytes)…..”

PHP memory allocation can be increased several ways.

1. Server wide PHP memory size can be increased via php.ini or similar and requires your hosting service partner’s help.
2. Easier solutions are either to

a. add the line php_value memory_limit 32M to your .htaccess file, or

b. add the line define('WP_MEMORY_LIMIT', '32M'); to your wp-config.php file in your Wordpress installation folder.

Note: .htaccess is usually hidden if it exists (in your root Web folder). You may need to turn on the reveal hidden files option in your FTP client to see it.

  • Share/Bookmark

Wordpress Upload Issue resolution

Finally, wordpress is installed and almost all plug-ins are up. Trying to post an image threw up a cryptic error message

“The uploaded file could not be moved to…”

Looks like the default installation path for “Store uploads in this folder” is set as “"wp-content". Here’s what is need to fix this:

  • Change the value from  “"wp-content" to “wp-content/upLoads"
  • Create a directory called "upLoads" under the directory “wp-content". Note that the folder names are case sensitive.
  • Assign World  ‘Read/Write/Execute’ permission (i.e: 0×777) for the new directory. 0×666 (Just Read/Write) doesn’t seem to cut it.

That should do it.

  • Share/Bookmark