Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

My website file structure is like this:

wp/wp files ...

In general in Site Address (URL) I have

In index.php I have:

    define('WP_USE_THEMES', true);

Everything works fine but for wp-admin i have

My question is: Can I change the url for wp-admin also to have

share|improve this question
As in move the location of wp-admin, or as in rewrite the URL? –  mor7ifer May 2 '12 at 12:52
wp-admin is at wp/wp-admin and I want to remove from url the wp/ part. I am happy with a rewrite rule also just to not be hard coded with website name. –  Alqin May 2 '12 at 13:37

2 Answers 2

You should be able to regex it with /wp/(wp-admin/.*) and point that to /$1, thus removing the /wp/. You can do this either via .htaccess or via wordpress' rewrite API.

share|improve this answer

if you're happy with a rewrite rule:

in .htaccess:

RewriteRule   ^wp/(.+)$   $1   [nocase,redirect=temp,last]

if might work without the [redirect] flag.

if you want to be very specific:

RewriteRule   ^wp/(wp-admin/.*)$   $1   [nocase,redirect=temp,last]

within WP (the rewrite will need to happen before permalink rewrites, etc):

add_action( 'init', 'gregory_rewrite_wpadmin' );
function gregory_rewrite_wpadmin()
        'top' );

not tested, but trying it won't hurt you ;-)


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.