Hi, this time i will share something good to you all. My friend from India, Adarsh, send me an e-mail this morning.
He is asking whether the login address of WordPress can be changed or not, and my answer is: yes, it can be done.
Before you follow this steps, make sure if you have an access to your FTP.
The first thing you have to do is: go to your WordPress dashboard > Settings > General
At an option named WordPress Address (URL), put a new URL for your site. For example, if your current site name is: http://www.my-site.com/, at this field you can type: http://www.my-site.com/new-direction.
Once you type your new URL, click on save button to apply it.
- Once you click on update button, your site may error. But, don’t worry about it
- Once you made this change, you can login to your site by accessing this URL: http://www.my-site.com/new-direction/wp-admin
The next step you have to do is access your FTP. Go to the root direction where you install the WordPress.
- On this directory, create a new folder with the exact name as what you type on step#1.For example, at the first step you type: http://www.my-site.com/new-direction. Then, the folder you create have to be named new-direction.
Move all files on the root directory to that folder, except 2 files:
- Open the file named index.php and find out this code:
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
Modify this code become:
require( dirname( __FILE__ ) . '/new-direction/wp-blog-header.php' );
Don’t forget to save the file once you done with it.
- Create another folder named wp-admin. Then copy this code below and save it with name index.php to wp-admin folder you just create.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="REFRESH" content="0;url=http://localhost/test2/"></HEAD> <BODY> </BODY> </HTML>
Those code will make everyone who access your-site.com/wp-admin be redirected to your main page (wp-admin directory is forbidden).
And your work already done! You can access your dashboard by go to directory: http://www.my-site.com/new-direction/wp-admin