WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Will wordpress still work with some html and other files in the same directory (8 posts)

  1. kilpatrick
    Member
    Posted 4 years ago #

    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

  2. stvwlf
    Member
    Posted 4 years ago #

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

  3. kilpatrick
    Member
    Posted 4 years ago #

    What do you mean fool some ?

  4. stvwlf
    Member
    Posted 4 years ago #

    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.

  5. kilpatrick
    Member
    Posted 4 years ago #

    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.

  6. fldtrace
    Member
    Posted 4 years ago #

    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.

  7. kilpatrick
    Member
    Posted 4 years ago #

    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

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

    will redirect 301 to

    http://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.

  8. kilpatrick
    Member
    Posted 4 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.