WordPress.org

Ready to get started?Download WordPress

Forums

move wp-config file (12 posts)

  1. vajjas1
    Member
    Posted 3 years ago #

    Hi,

    i read on the forms to make it more secure to move the wp-config to a different directory, my web designer is saying its hard to move it or not possible to move it. His comment is "if we will do this then wordpress will not work because this file has some imp. constants for directory structure."

    is it true? or can i suggest him something about how to move without impacting the directory structure or constants?

  2. govpatel
    Member
    Posted 3 years ago #

    It can be done but problem will come every time yo update wordpress your core wp-config.php file will be over written so you will have go in and edit the files.

    If you are so worried about securing your wp-config.php file change the permission on so that no one can edit that file.

  3. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    You can move the wp-config file up one directory from the site-root without an issue. The loader looks in the site root directory and one directory above it for that file.

  4. govpatel
    Member
    Posted 3 years ago #

    You know what something new I learned I just tried it out my test site it does work Thank you Otto

  5. vajjas1
    Member
    Posted 3 years ago #

    i am confused. i see a wp-config file in wp-includes and wp-admin is it supposed to have in every directory? i thought its only in the public_html directory?

  6. vajjas1
    Member
    Posted 3 years ago #

    well i managed to move it but when i load the site i get below error: :-( how did u guys do it?

    There doesn't seem to be a wp-config.php file. I need this before we can get started. Need more help? We got it. You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

  7. govpatel
    Member
    Posted 3 years ago #

    its the one in your root that you move one directory up leave others as is .

  8. vajjas1
    Member
    Posted 3 years ago #

    i moved the file to wp-includes

  9. vajjas1
    Member
    Posted 3 years ago #

    i get the above error that config file is missing

  10. govpatel
    Member
    Posted 3 years ago #

    You need to move wp-config.php file out of public_html or root in your home where You will see folder public_html,public_ftp and other folders.
    wp-includes is still in public_html that is not one directory up

  11. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    vajjas1: No, *up* a directory. Moving it into wp-includes is *down* a directory.

    Example:
    /username/public_html/wp-config.php
    /username/wp-config.php

    It will check those.

  12. sk
    Member
    Posted 2 years ago #

    Yep that works nicely, wordpress checks the hosting root directory automatically and it can't be accessed by www. Nice tip!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.