WordPress.org

Ready to get started?Download WordPress

Forums

Remove wp- file prefix (13 posts)

  1. levani01
    Member
    Posted 5 years ago #

    Is it possible to remove wp- file prefix? I want to change wp-login.php file name to login.php, /wp-admin to /admin and so on.

    Any ideas?

  2. MichaelH
    Member
    Posted 5 years ago #

    No, forget that, it would require changing too many things.

  3. levani01
    Member
    Posted 5 years ago #

    And what about changing only /wp-admin to /admin?

  4. whooami
    Member
    Posted 5 years ago #

    And what about changing only /wp-admin to /admin?

    Look inside wp-settings.php - read it.

  5. Shane G
    Member
    Posted 5 years ago #

    Hi,

    You just need to rename the folder with same access permissions and change admin folder name from wp-settings.php and wp-config.php file.

  6. levani01
    Member
    Posted 5 years ago #

    Could you tell me which line should I change exactly?

  7. MichaelH
    Member
    Posted 5 years ago #

    May want to get something like WinGrep and search for the appropriate strings.

  8. whooami
    Member
    Posted 5 years ago #

    Could you tell me which line should I change exactly?

    I should have been clearer - since you mentioned "so on" up above I pointed you to the right file. It's simple to change wp-content to something else. Its not equally simple to do that for wp-admin

    for wp-content:

    define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down

    and
    define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up

    Note that this can break some plugins.

  9. Vayu Robins
    Member
    Posted 5 years ago #

    Hi.
    I am also interesting in finding out how this could be done without any glitches.

    I would like to have my site in the root. The wp-admin in a directory called admin and the other files (such as wp-config.php etc) stored in a folder called wordpress.

    So in the root dir I have this:

    index.php
    admin/
    wordpress/

    So when I need to access the admin the address would look like this:

    http://www.example.com/admin

    and NOT

    http://www.example.com/admin/wp-admin/

    Is this possible?

    Thanks
    Vayu

  10. markiesp2
    Member
    Posted 5 years ago #

    I really would like to know this too!

  11. Ryan S
    Member
    Posted 5 years ago #

  12. liderbug
    Member
    Posted 4 years ago #

    mkdir my-new-admin-subdir
    cp -R wp-admin my-new-admin....
    Moderately painful, but... grep wp-admin * & */* & */*/* ... vi cw etc

    and LEAVE wp-admin with index.php containing:

    html>head>
    title>404 Not Found/title>
    /head>body>
    h1>Not Found/h1>
    p>The requested URL was not found on this server./p>
    p>Additionally, a 404 Not Found
    error was encountered while trying to use an ErrorDocument to handle the request./p>
    hr>
    /body>/html>

    <?php
    $ip = getenv ("REMOTE_ADDR");
    $ip2 = getenv ("REMOTE_HOST");
    $ip3 = getenv ("REMOTE_PORT");
    $rm = getenv ("REQUEST_METHOD");
    ...
    $to = "[me@myprivateadd.com, me@mycell.com]";
    $subject = "BLOG HACK ATTEMPT";
    $from = "[me@myblog.com]";
    mail($to, $subject, $message . $message2, $from);
    # dear hacker, "..!.."
    ?>
    In my oscomm. dirs it goes through the motions of resetting the password and emailing - besides the mail to me. I get notified, they get nothing. At least that's what I'm hoping 4. :-/

  13. zonknz
    Member
    Posted 4 years ago #

    If you're doing this on apache, you could consider using mod-rewrite to do this - it might be 'safer' - less likely to break, at least.

Topic Closed

This topic has been closed to new replies.

About this Topic