Disable front end to use as CMS only?

I’m using the WordPress database and back end to administer the news for my band’s website and everything is working great however I’d like to disable the front end of WordPress itself.

I have the WordPress installation installed in /wordpress/ and obviously the admin section is under /wordpress/wp-admin/.

What would be the best way to restrict someone from accessing the rather *un*setup WordPress site itself without affecting the admin section?

If anything, I could simply redirect to the website’s proper home page (domain.com/).

8

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