WordPress TinyMCE & .htaccess Errors
While working on customizing one of my clients WP Sites, I ran into memory limit errors after upgrading from WordPress 2.9.2 to WordPress 3.0.1. Though it seemed to be a relatively insignificant issue, when I attempted to automatically update the WordPress core from the administration panel, WordPress informed me that action failed from the lack of available memory. Then again I ran into memory errors when I attempted to upgrade a plug-in that required more than what was allowed. In this case the WordPress NAVT plug-in was the culprit. I could understand having memory issues upgrading the WordPress core, but seeing that I update plug-ins quite often I decided to do something about it.
Searching online for a solution to this problem, I came across a post from Jeff at PerishablePress. Jeff provided a very good post demonstrating how to increase memory limits for the WordPress includes directory. However, I don’t know how effective the workaround are for those that are on shared hosting. Most hosting companies require administrator level access to modify global server settings and do not offer user the ability to manipulate server memory levels.
Jeff’s solution was to make three changes to increase the memory levels. First, place a PHP statement in the head of the wp-includes/cache.php file.
ini_set('memory_limit','32M'); // set memory to prevent fatal errors
Next, create an .htaccess file in the wp-includes directory with the following statement.
# set memory limit for cache.php php_value memory_limit 32M
And last, create a localized php.ini file to increase PHP’s memory limit.
;; set memory limit for cache.php memory_limit = 32M
However, my clients’ site is on shared hosting and this solution did not work. So, my solution was resolved by simply contacting the hosting company and requesting a memory increase from 16M to 32M.
After attempting Jeff’s solution, I simply contacted the host and forgot to remove the .htaccess file from the wp-includes directory. Later that day, when I went to edit some of my clients pages, I realized something was wrong with the WordPress visual editor TinyMCE. The last thing I would have suspected was the .htaccess file in the root of the wp-includes directory but alas, that was the problem.
It seems that TinyMCE’s permissions will be effected if there is an .htaccess file in the wp-includes directory and without an explicit statement allowing TinyMCE access, it will not work properly. Thanks to Doug Joseph for posting his solution over on the WordPress support site. So, if you have problems getting TinyMCE to show up in WordPress double check for any permission related errors as this was a difficult to find, yet simple to resolve issue.
0 comments
Kick things off by filling out the form below.
Leave a Comment