• Resolved kilpatrick

    (@kilpatrick)


    I cant see any logical reason why it wont work but I need to check before I do this. Will WordPress still work even if other files remain in the same directory.

    I will be redirecting all current files in the directory to their new home on wordpress. However just in case I forget to redirect some I would like to leave them in place.

    Best regards – Glenn

Viewing 7 replies - 1 through 7 (of 7 total)
  • stvwlf

    (@stvwlf)

    You may have to fool some with redirection since WP assumes everything in its URL folder is related to it.

    Thread Starter kilpatrick

    (@kilpatrick)

    What do you mean fool some ?

    stvwlf

    (@stvwlf)

    tinker with

    my suggestion is set up a WP install in another folder, or on another domain or subdomain and duplicate the conditions you will be working with. Just do a minimal install, with the default theme and a few posts and pages. Set your WP permalinks as you intend to have them.

    Copy some of the HTML pages you intend to keep in that folder into the WP root. Then see what happens when you type their URL’s in the browser address bar. You may have to set up redirect coding, for example in the .htaccess file, before the WordPress redirect code in the same file, to allow files with the extension .html and whatever else will be in there to not redirect over to WordPress. Because otherwise everything in the WP folder is automatically redirected to the WP index.php file.

    You can also redirect them from within WP itself.

    Thread Starter kilpatrick

    (@kilpatrick)

    Thats good logical thinking. Why didnt I think of that ?? Many thanks for a sensible and helpful suggestion. I just regained some faith in these forums.

    To answer your question, wordpress will work with any file in its directory except index.html which will load instead.
    However it is a good practice to redirect old files and than delete them or even better keep the backed-up in a separate folder.

    Thread Starter kilpatrick

    (@kilpatrick)

    Cheers mate. I will be using a 301 redirect in htaccess to redirect all the files to their new home which is on wordpress. For example

    https://www.mydomain.co.uk/bass-fishing-101.php

    will redirect 301 to

    https://www.mydomain.co.uk.co.uk/bass-fishing-101/

    I do wish to keep the old files (ie .php) in place for the time beng just incase I miss some of the 301 redirects by accident.

    But thankyou very much for your post it was appreciated.

    Thread Starter kilpatrick

    (@kilpatrick)

    Just an update on this. I have got everything working now. The only problem I am having is finding a 301 to redirect the .php to expressionless urls

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Will wordpress still work with some html and other files in the same directory’ is closed to new replies.