I have an existing website, which I want to move to wordpress, while keeping the same domain name/ URL's used in the old version.

So far I have installed wordpress locally, and am migrating the site manually. Will the URLs be the same as they are now (locally), when going live? Aka. with "/wordpress/" in the page URL, or when linking to my PDF files "/wordpress/wp-content/uploads/" in the URL?

As this is an existing site being moved I need the URL's to stay the same as they are now. I need them to be: mydomain.no/artikler (instead of mydomain.no/wordpress/artikler)

Linking to a PDF: mydomain.no/artikkelserie/cs_eb_webartikkel_5_i_visjon_1-07.pdf (instead of mydomain.no/wordpress/wp-content/uploads/artikkelserie/cs_eb_webartikkel_5_i_visjon_1-07.pdf)

How can I avoid this?

I have tried using the plugins "add from server" and "media file manager" (creating an renaming media folders) to try and circumvent this, but to no success so far.

Any help would be greatly appreciated!


  • 1
    Have you reviewed Moving WordPress?. You'll need to move all the physical files on the server as well as the database. Then, you'll need to run a find and replace on the database with your old url to your new localhost url. I like this tool. Then, when you move it back to the live site, you'll need to repeat the process. If you search this site, there are many, many good answers on the subject. Commented Dec 5, 2014 at 19:01

1 Answer 1


A combination of answers for you. To remove the "wordpress" from your URL path, I would recommend the following step-by-step on "Using a pre-existing subdirectory". http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

The end result will be your Wordpress content pages at "mydomain.no" instead of "mydomain.no/wordpress".

The second part of the problem will involve writing 301 redirects for the URLs that will change. PDFs and other files hosted in the media library will have new URLs. That is not the disaster that you may think. Creating a 301 for every URL that changes preserves Google rankings and existing links to the content.

The format for your redirects should look like this: redirect 301 /oldfile.html http://mydomain.no/newpath/

Paste this into the .htaccess file, directly below the Wordpress rules you find there.

  • Apologies for such a late reply- I greatly appreciate your help! I was originally hoping to avoid doing redirects, but you made me think of it differently, and have convinced me to just go for it. Thanks heaps!
    – Thea
    Commented Dec 10, 2014 at 16:48
  • No worries - hope it works out for you.
    – jdm2112
    Commented Dec 10, 2014 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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