Skip to content

why does it add /wp to url? #4

Open

Description

@timbakkum

I am using your starter project for a project locally and have my MAMP host set to the public directory, but why I go to my project localhost, it automatically adds /wp to every url. I.e. local.myproject/wp or local.myproject/wp/wp-admin Why does it do this and is there any easy way to get rid of this?

edit: I seemed to have gotten rid of the /wp in the url by moving the .htaccess file up one directory and changing the rewrite base and rule to / from /wp. I'm by no means an expert with this, so wondering if this is the right way to do it or is there a better way?

update: this actually makes /wp-admin and /wp-includes inaccessible.. anybody got an idea on how to get around this issue? I'd appreciate it.

Activity

  1. szepeviktor commented on Jul 21, 2022

    @szepeviktor

    @timbakkum You need to set two URL-s.

    wp option set home https://example.com
    wp option set siteurl https://example.com/wp

    WP-CLI is your friend.

  2. gilzow commented on Jul 21, 2022

    @gilzow

    @timbakkum see line 29 in composer.json.

    Since this is a composer-based WordPress set-up, WordPress core needs to be in its own directory, separate from wp-content. Otherwise, updates to core would wipe out wp-content.

    having core in /wp/ and having it exposed in the URL shouldn't break anything. If you don't like it visually, you can set up rewrite rules in your web server to rewrite requests to /wp-includes and /wp-admin to the correct location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions