Disable front end to use as CMS only?

To make sure only the front end redirects to domain.com, make a theme that uses the PHP header() function.

  • Create a folder called redirect or
    something.

  • Add two files to the
    folder: style.css and index.php
    (necessary for a valid WP theme)

  • In style.css, add something like
    this:

    /*  
       Theme Name: Redirect  
       Description: Redirects the front end to domain.com  
    */
    
  • In index.php add this:

    <?php
         header( "Location: http://domain.com" );
    ?>  
    
  • Upload the folder to the themes directory and then activate it in the admin UI.

Leave a Comment