Support » Fixing WordPress » Remove wp- file prefix

Viewing 12 replies - 1 through 12 (of 12 total)
  • No, forget that, it would require changing too many things.

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




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

    Look inside wp-settings.php – read it.


    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.

    Could you tell me which line should I change exactly?

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




    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

    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.

    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:


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

    and NOT

    Is this possible?


    I really would like to know this too!

    Ryan S


    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:

    title>404 Not Found/title>
    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>

    $ip = getenv (“REMOTE_ADDR”);
    $ip2 = getenv (“REMOTE_HOST”);
    $ip3 = getenv (“REMOTE_PORT”);
    $rm = getenv (“REQUEST_METHOD”);

    $to = “[,]”;
    $subject = “BLOG HACK ATTEMPT”;
    $from = “[]”;
    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. :-/

    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.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Remove wp- file prefix’ is closed to new replies.