WP-Codebox fix so that it doesn’t prevent posts export

If you have a PHP configured with some open_basedir restriction (which is recommended), the WP-Codebox plugin will prevent you from exporting the posts of your blog. Go to your blog, go in the “wp-content/plugins/wp-codebox” dir and edit the “wp-codebox.php” file : On line 27, you should have : include_once "../../../wp-config.php"; include_once "../../../wp-settings.php"; Well, it fails because the plugin doesn’t use the good practices, so it’s pretty easy to fix :...

May 15, 2010 · Florent Clairambault

Dirty WordPress APC caching

One or two weeks ago, I made a simple AB benchmarking test on a PHP site I built, it was ok. Then I did the same test on this blog and well… It was freaking slow… On 100 pages with 10 concurrent access, it took 3.5 to 10s to render. Well, I thought I should remove all these plugins I installed to make me and my blog famous (they didn’t perform well)....

February 13, 2010 · Florent Clairambault

WordPress supports MultiSites

WordPress now supports MultiSites with its 3.0 version. It’s the current SVN development version. This means you can have one wordpress install for multiple sites. You can see how it works by looking into ms-settings.php. This is quite a good news for anyone willing to manage a community of bloggers. Here is a part of the wp-includes/wp-settings.php file : function wpmu_current_site() { global $wpdb, $current_site, $domain, $path, $sites; if( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) { $current_site->id = (defined( 'SITE_ID_CURRENT_SITE' ) ?...

January 10, 2010 · Florent Clairambault

WP Codebox Quick fix for WordPress 2.9

This bug has been fixed !I like to have the latest version of WordPress, this is why I use the SVN version. And recently the CSS of the “WP Codebox” plugin stopped working. Here the explanation and the solution : It seems that starting with the 2.9 version, you can register the styles in the wp_print_scripts action method. So in the wp-codebox.php file, you have to put this : add_action('wp_print_scripts', 'Codebox_ScriptsAction'); function Codebox_ScriptsAction () { $cb_path = get_bloginfo('wpurl') ....

December 7, 2009 · Florent Clairambault