WordPress.org

Ready to get started?Download WordPress

Forums

Potential .htaccess file confict? (3 posts)

  1. simplycolin
    Member
    Posted 8 years ago #

    I've been experimenting with a WP installation and have been populating the database using an unused domain extension as part of my hosting package, but I now want to install what I've created with the domain extension (in my case, I'm moving it from a .biz domain to the primary .co.uk domain). I am about to place the WP files and folders into the root of my webspace, where an existing html website is so be replaced by the WP based site.

    My question, therefore, relates to .htaccess files. I already have an htaccess file with lots of stuff in it and which I don't want to lose. In moving the WP files into the root space, will it be OK for me to simply combine the contents of the two htaccess files and leave it where it is? WP won't periodically over-write the data or anything, will it?

    I will, of course, experiment after backing up everything I have just in case, but second-opinion input would be appreciated!

    Cheers

  2. maerk
    Member
    Posted 8 years ago #

    WordPress only writes anything to you .htaccess when you update the way permalinks work. So you actually don't need to worry -- when you setup permalinks, it will tell you something like "if your .htaccess file were writable, this code would have been added to it"

    All you need to do is copy the code it gives you into the .htaccess manually. I put my wordpress code right at the end of the file, that way it won't conflict with any of the other directives.

    If you have any doubts, feel free to copy the contents of both files here, and someone will be able to help.

    Generally, it's a good idea to make as few files as possible writeable, especailly things like .htaccess files. If you're on shared hosting, other people on the server may be able to access and edit your files.

  3. simplycolin
    Member
    Posted 8 years ago #

    Thanks maerk, that's encouraging. I suspected that it would be OK but I thought it worthwhile checking. I'm pretty good about most server-side ops of this sort and I've learned the hard way with messing about with htaccess! I host quite a few sites from my hosting account and things are pretty watertight, but you're quite right to suggest locking down as much as possible.

    Thanks for your help, anyhow. I'll just dive in, I think!

Topic Closed

This topic has been closed to new replies.

About this Topic