• Mike G

    (@djmikeg68)


    My current site: an old non-Wordpress php site.

    My new site: a WordPress site currently in the “WP” subdirectory.

    When I delete the old site and go live, I want to remove “WP” from all page URLs. The actual WP subdirectory and its contents can remain where they are, I assume.

    But what will happen to all my WordPress site images? Do their URLs need to change? God, I hope not manually. There will be about 300 of them across 200 pages.

Viewing 3 replies - 1 through 3 (of 3 total)
  • InterServer

    (@interservernet-web-hosting)

    You can setup redirection to wp directory without showing wp directory in the browser by adding the following code in .htaccess.

    RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
    RewriteRule !^subdir/ /subdir%{REQUEST_URI} [L,NC]

    Replace “domain” with your domain name and “subdir” with sub directory name.

    Actual location of files or directories are not changing so there is no need to make any changes in the image path.

    Thread Starter Mike G

    (@djmikeg68)

    Thanks for the tip.

    Is that in addition to changing these fields in Settings/General Settings:

    WordPress Address (URL)
    Site Address (URL)

    Mark Ratledge

    (@songdogtech)

    @InterServer: there is no need to use redirects in .htaccess for a subdirectory move.

    @mikeg: the easiest way to move from a subdirectory is to read Giving WordPress Its Own Directory ? Using a pre-existing subdirectory install. Your images and wp-admin will stay in /wp/, but the site will appear to be in root from the front end.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘removing 'wp' from URL – what happens to images’ is closed to new replies.