标签: WP_MEMORY_LIMIT

解决WordPress升级出错:Allowed memory size of 33554432 bytes exhausted

八月 12th, 2009

IMJZ刚建成就有更新,当然要升级咯。

第一次升级可不能马虎,怀着惴惴不安的心情点了升级,

郁闷,果然出错了。
google了下,还好解决方法不太麻烦。http://wordpress.org/support/topic/194370

Here’s the full solution in the cleanest possible way:

  1. Create a file called php.ini in the root of your site (if you are using a hosted addon domain, this must be in the subdirectory of that site)
  2. In php.ini, enter a line that says
    memory_limit = 64MB
  3. In your site’s .htaccess (being a WordPress blog, I’m assuming there is one), enter the following line
    SetEnv PHPRC /<unix path to the directory where php.ini is>/
    (keep the slashes)
  4. Edit wp-config.php and enter the following line
    define('WP_MEMORY_LIMIT', '64M');
  5. Upload the new files to the server

Oh, and don’t tell your hosting provider you’ve done this…

租用的空间改php.ini 比较麻烦,按照第四点,改了wp-config.php,升级OK。

Tags: , ,
Posted in Website | No Comments »