WordPress.org

Forums

Move WordPress From a Folder to Root (5 posts)

  1. eds-danny
    Member
    Posted 1 year ago #

    Hello everyone !

    I want to move my WordPress from a folder (example.com/blog) to root (example.com). This is not so hard, but problem is the following:

    Actual blog (example.com/blog) is generating some traffic and I want to redirect users to the same link, but in the root, for example:

    example.com/blog/?p=111 to example.com/?p=111

    Is this possible ?

  2. Dave Naylor
    Member
    Posted 1 year ago #

    If you can do so, make an entry in your .htaccess file:

    RedirectMatch 301 /blog/ http://example.com/

  3. eds-danny
    Member
    Posted 1 year ago #

    Sorry, but doesn't work.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

  5. eds-danny
    Member
    Posted 1 year ago #

    I've already copied everything and it works, changed all links by replacing links in SQL carefully.

    Anyway, I need to make the redirect from BLOG to ROOT.

    For example, if you type in your address bar:

    example.com/blog/my-post

    should redirect to

    example.com/my-post

    I need to change something on the old blog to redirect correctly to the new one.

Topic Closed

This topic has been closed to new replies.

About this Topic