user-pic

¿Any command line tool to rebuild MT?

Vote 0 Votes

Hi,

I have a big Blog with 5 years old -> runing whith MT (4.32).
I have 14.000 entrys and rebuil Takes at least 4 hours.

There is any solution to rebuil from command line, to rebuild fastest?

thanks
Nicolás.

Reported on Movable Type 4.3

6 Replies

| Add a Reply
  • There's mt-rebuild. You can find it with a Google search.

  • As Mike has said, there is mt-rebuild.

    You might also want to look in to streamlining your templates, publshing strategies, and other ways of making MT faster.

  • Or you could hire a consultant (as I am) and improve your project so that it rebuilds faster.

    For instance, a project of over 14,000 entries from a large European publishing company rebuilds in less than 20 minutes.

  • Worth mentioning that it has over 100,000 k comments and quite some complex templates.

  • Hi, tanks by the replies (sorry for my bad english)

    Im try whit mt-rebuild but I can't acces to my server comman line. shh o telnet is closed to my acount.

    I try use a PHP script to invoke a mt-rebuild.pl

    like this:

    echo passthru('mt-rebuild.pl -mode="all" -blog_id=1');


    but "mt-rebuild.pl" file take some time in complete the work and php time out is show.

    ¿There is any way to change script to show % of rebuild proces?

    Example:

    mt-rebuild.pl -mode="all" -blog_id=1

    Done 1%
    Done 2%
    ..
    Done 100%

    the task is like this:
    linux (rining script in perl) show in php -> show in web browser

    thanks

  • There is no way to get around that except move to a host where you can SSH into your account. Hosting Matters is a great host for Movable Type that lets you get SSH access as a standard feature. What I do with my site when I need to rebuild everything is I use Send2PQ (send to publish queue, a plugin by Endevver Consulting) and a custom perl script I wrote which runs it from the command line:

    use strict;
    use lib('../../lib', '../../extlib/', './lib');
    use MT;
    use MT::Blog;
    
    

    MT->instance();
    my $blog = MT::Blog->load({id => $ARGV[0]});

    my $batch = MT->model('pub_batch')->new;
    $batch->blog_id( $blog->id );
    $batch->email( $ARGV[1] );
    $batch->save
    or die "Unable to create a publishing batch and send content to the publish queue";

    require MT::Request;
    my $r = MT::Request->instance();
    $r->stash('publish_batch',$batch);

    require MT::WeblogPublisher;
    my $pub = MT::WeblogPublisher->new;
    $pub->rebuild( Blog => $blog );

    I run that from within the Send2PQ folder.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

694 2908

Last Topic: Blogspot to Movable Type by sdude on Feb 8, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 565

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012