Skip to content

Instantly share code, notes, and snippets.

@mikeemoo
Created May 21, 2012 17:29
Show Gist options
  • Save mikeemoo/2763428 to your computer and use it in GitHub Desktop.
Save mikeemoo/2763428 to your computer and use it in GitHub Desktop.
Broken wordpress load
<?php
namespace Lowpress\WordpressBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
public function indexAction()
{
$docroot = $this->getRequest()->server->get('DOCUMENT_ROOT');
define('WP_USE_THEMES', true);
require_once($docroot.'/wp-load.php');
require($docroot.'/wp-blog-header.php');
return new \Symfony\Component\HttpFoundation\Response();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment