I have a wordpress website (www.example.com) where the file are located in a sub folder of the public_html (public_html/x/wp folders).

Since I'm getting some troubles with some plugins and caching programs I would like to move the content to the main folder, therefore, even though it shouldn't change anything on the navigation of the website (because the WordPress installation is set on www.example.com/x/ and the viewing URL is set to www.example.com) all the media files will need to be redirected to the new location.

I have quite a good SEO on this website and I don't want to lose it.

I know I could simply use this code on my .Htaccess file:

RewriteEngine on
RewriteRule ^subfolder/(.*)$ /$1 [R=301,L]

My question is: Will it work as simply as moving the WordPress files to the root, changing the installation settings in the admin area and use this code?

Will I lose SEO on the indexed images on Google ect?

Will it work for every link in the website?

  • 1
    I'm not familiar with the terminology "viewing URL." I run several WordPress websites and I've never come across that terminology. WordPress has settings for the "site address (URL)" and the "WordPress address (URL)" (reference). Is one of those what you are talking about? Mar 11 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.