Skip to:
Content
Pages
Categories
Search
Top
Bottom

Going from 1.0.3 to 2.0 – what needs to be done

  • Hi. Sorry if I am posting this in the wrong section. I did some searching and did not see any answers on this. I currently have bbpress 1.0.3 installed on a WP 3.2 platform. If I choose to upgrade to bbpress 2.0, what do I need to do for this since these appear to be two completely different installation methods?

    Thanks – Erik

Viewing 18 replies - 1 through 18 (of 18 total)

  • Gautam Gupta
    Participant

    @gautamgupta

    When you would install bbPress 2.0 plugin on WordPress, go to WordPress Admin Section -> Tools -> Import -> bbPress importer and follow the onscreen steps. :)

    Awesome! Thanks! I am using Page.ly as my hosting provider and I do not get permission to access myPHPAdmin so I wasn’t sure if anything else needed to be done on the db side.


    cantregister2
    Member

    @cantregister2

    This doesn’t seem to work for me. How do I know if I need to migrate users first?

    If I try to migrate users, it says:

    “We’re in the process of migrating your users…

    Renamed the wp_users and wp_usermeta tables to bb_wp_users_tmp and bb_wp_usermeta_tmp respectively.

    There was a problem duplicating the table bb_users to wp_users. Please check and re-run the script or duplicate the table yourself. “

    Which makes sense because there isnt a bb_users table.

    So, I guess I didn’t need that.

    Then I do the next step to “Import forums” and I get:

    “Total number of forums: 11

    Processing forum #1 (FirstForum)

    Added the forum as forum #13021″

    but, then it hangs there.

    any ideas?


    Doug Smith
    Participant

    @douglsmith

    When it hangs, PHP is likely running out of memory. If you turn debug on in your wp-config.php file then you may be able to see more detail of what is happening.

    You can free up some memory by temporarily disabling all other WP plugins. I imported a fairly large forum and I ended up having to export my data to a copy of my site on my local computer where I could bump up PHP’s memory quite high.


    cantregister2
    Member

    @cantregister2

    hey thanks for the tip! that was just what I needed.

    I now see the error message that confirms the memory limit ordeal.

    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 128 bytes) in /wp-includes/load.php on line 569

    However, if I boost that limit in my php.ini file to 500M and confirm that the memory limit is indeed 500M in php_info(), I still get the same error on import.

    Any ideas on what memory limit I need to set? The machine itself has 1024M of ram

    “free -m” tells me:

    total used free shared buffers cached

    Mem: 1024 705 318 0 6 424

    -/+ buffers/cache: 274 749

    Swap: 2047 38 2009

    I should also mention that I re-wrote the import script so that bb_cache_first_posts doesn’t take all topics at once in on single array, but instead breaks them up for processing into chuncks of 20 using array_chunck

    Where is all of this memory being created and hogged?

    thanks for any more suggestions.


    probablynot
    Participant

    @probablynot

    So the importer said it wouldn’t delete the existing user table, just rename it… but I can’t find it now. Seems like the importer obliterated my user table. Any ideas?

    Nevermind.. I found them.


    cantregister2
    Member

    @cantregister2

    Like I said before, I changed the script so that it imports the topics incrementally, and not all at once like it was doing previously.

    I am now using memory_get_usage(true) to see what’s going on with php’s memory.

    When I load the wp-admin interface, total mem usage is only around 30M.

    At the top of bb_cache_first_posts() function, total mem usage is 215.75M.

    Why is that? That seems strange to me. Where is all that memory going to?

    I also discovered that my memory usage stays the same for the first 4280 topics in the import process. Then, memory usage goes up until it maxes out on the 15920th topic at 256M.


    Doug Smith
    Participant

    @douglsmith

    I found that bumping the memory limit up in my php.ini wasn’t enough. If I’m reading the WordPress admin code right, it sets a memory limit which may actually be lower than what you’re trying to use and it overrides your settings.

    I added the following overrides to my wp-config.php file and that allowed me to complete the import. This was on a local machine with a large forum so you would probably want to try it with a lower limit to start.

    define('WP_MEMORY_LIMIT', '2048M');<br />
    define('WP_MAX_MEMORY_LIMIT', '2048M');


    cantregister2
    Member

    @cantregister2

    thanks.

    I did that too. No matter what I set the WP_MEMORY_LIMIT or WP_MAX_MEMORY_LIMIT to, I get the same error that says it stops at 256M.

    Is there anywhere else that the memory limit could be overridden?


    Doug Smith
    Participant

    @douglsmith

    Once I increased the memory limits in my php.ini AND set defined those limits in my wp-config.php it solved it. I’d also make sure all other plugins are disabled just to be sure they aren’t setting anything. I know I’ve seen at least one plugin that tried to increase memory limits.


    cantregister2
    Member

    @cantregister2

    Hi thanks again for the response.

    I have increased the memory limits in both the php.in and the wp-config.php file.

    I have also disabled all plugins.

    I can see that when the wp-admin loads up, memory usage is at 30M.

    When the import script gets to the bb_cache_first_posts() function, before it even starts to import the data, total mem usage is 215.75M.

    I suspect there is a memory leak.


    cantregister2
    Member

    @cantregister2

    Here’s an update. I was able to get further by adding the following to ‘step3’ of the bbpress.php file.

    ini_set("memory_limit", "500M");

    but, it seems the import script lags behind incredibly.

    Is there no way to run this on the command line?

    Is there any reason why it is so inefficient with memory usage?


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Right now the migration script isn’t properly chunking the posts inside of each forum into small, usable parts. Working on a fix for 2.1.


    cantregister2
    Member

    @cantregister2

    I see the culprit is in the importer:

    <br />
    $topics_query = new BB_Query( 'topic', array(<br />
    'forum_id' => $forum->forum_id,<br />
    'per_page' => -1,<br />
    'topic_status' => 'all',<br />
    'order_by' => 'topic_start_time',<br />
    'order' => 'ASC'<br />
    ) );<br />

    Instead, it should be something like:

    <br />
    $page=0;<br />
    $per_page=50;<br />
    $topics_query = new BB_Query( 'topic', array(<br />
    'forum_id' => $forum->forum_id,<br />
    'per_page' => $per_page,<br />
    'page' => $page,<br />
    'topic_status' => 'all',<br />
    'order_by' => 'topic_start_time',<br />
    'order' => 'ASC'<br />
    ) );<br />

    Strange thing is that even when you step through the pages it still doesn’t free the memory. You can test it with:

    while (isset($topics_query->results)) {

    echo "<p>Mem usage=" . memory_get_usage(true)/1024/1024 . "</p>";

    //echo "

    "; print_r($topics_query->query); echo "

    ";

    //echo "<p>" . $topics_query->results[0] . "</p>";

    $page++;

    $topics_query->query = $page;

    //thought following might help, but doesn't

    //unset($topics_query->results);

    $topics_query->query();

    }

    exit;


    cantregister2
    Member

    @cantregister2

    sorry about the garbled code above. I tried to edit it so that it shows up clean, but bbpress won’t let me.


    Investigating further, this seems to be a known memory leak in PHP:

    http://paul-m-jones.com/archives/262

    I just went to import from 1.0 and received this error message as above “If I try to migrate users, it says:

    “We’re in the process of migrating your users…

    Renamed the wp_users and wp_usermeta tables to bb_wp_users_tmp and bb_wp_usermeta_tmp respectively.

    There was a problem duplicating the table bb_users to wp_users. Please check and re-run the script or duplicate the table yourself. “

    Which makes sense because there isnt a bb_users table.”

    However immediately afterward I was logged out of my website and the login credentials no longer work. Any ideas on how to fix this?

    Do I go into phpmyadmin and rename the tables “tmp” tables back? I am not sure where in phpmyadmin I can do this.

    Thanks in advance for your help


    cantregister2
    Member

    @cantregister2

    bushtool,

    The same thing happened to me. You need to rename the tables back to wp_users and wp_usermeta. You can do this with the command line mysql client…or with phpmyadmin. Depending on your version, you should be able to click on the table name. This gives you a new page with that table’s info. Then under “operations” in the top right, you should find a menu to change the name of the table back to the original name.

    cantregister2 – thanks for the help. just what I needed to restore the tables.

Viewing 18 replies - 1 through 18 (of 18 total)
  • You must be logged in to reply to this topic.
Skip to toolbar