Cannot redeclare wpsc_register_post_types

I received the error "Cannot redeclare wpsc_register_post_types" while setting up a WordPress powered website to be used as a CMS. Everything was working locally but once I uploaded to the server I was continually getting the error around the wpsc_register_post_types function call. The first thing I tried was to deactivate the plugin which then caused an out of memory error when trying to allocate around 26mb of memory in wp-admin/menu.php. I decided to comment the lines out around the function call which was causing the error and the error simply moved to another function call to do with canonical links. I was then almost sure that the errors were being caused by insufficient memory. There are a few ways to solve your memory allocations whether it be with WordPress or a normal website, here are a few options.

  1. Add "memory_limit = 64" to your .htaccess file
  2. Add "memory_limit = 64M" to  a php.ini file
  3. Change the WP_MEMORY_LIMIT in wp-config.php to 64M

In the above suggestions I have used 64M because the default was 32M and I decided to double it. You could simply increment the memory amount by 2Mb's at a time until the errors go away if you are short on memory. Be sure to put the .htaccess or php.ini files in the same directory as the scripts using the additional memory.

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.