WordPress.org

Ready to get started?Download WordPress

Forums

Need to redirect users away from /wp-admin/ for maintenance (6 posts)

  1. pisaacs
    Member
    Posted 1 year ago #

    I was hoping someone could point me in the right direction.

    I'm trying to move my live server today and I don't want contributors loggin in while I do this, so I was thinking of just redirecting people away form /wp-admin/ to a "down for maintenance" page but I have no idea how to do this.

    Can I maybe put a line into the .htaccess file or something?

    Anyhelp would be appreciated.

    Thanks,

    Philip

  2. esmi
    Forum Moderator
    Posted 1 year ago #

  3. pisaacs
    Member
    Posted 1 year ago #

    yes, but this takes the whole site down. I only want to take the admin off line.

    Philip

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    You could try looking for another, more specific, plugin. If you try to use an .htaccess redirect, you'll just end up locking yourself out of your admin area.

  5. Justin
    Member
    Posted 1 year ago #

    You can do something like

    Options -Indexes +FollowSymLinks
    RewriteEngine on
    RewriteRule /wp-admin http://www.your-redirect-url.com/ [R=301,L]

    This could however possibly break any ajax on the front end if you have any..

    EDIT: You will lock yourself out of admin as well with this code...

  6. pisaacs
    Member
    Posted 1 year ago #

    Thanks Justin! That's what I need.

    Esmi - I don't need to log into the back end while I'm moving the site.

    Awesome, thanks guys!

    Philip

Topic Closed

This topic has been closed to new replies.

About this Topic