• Will wp automatic update override my current wp-config.php? If yes, how should I prevent the overriding?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • No, WordPress automatic updates will not override your current wp-config.php file. This file contains important configuration settings for your WordPress site, such as database credentials and security keys, and WordPress is designed to leave this file untouched during updates.

    However, if you have made any custom modifications to your wp-config.php file, it’s important to back up your file before updating WordPress. This will ensure that you have a copy of your original wp-config.php file in case anything goes wrong during the update process.

    To prevent the wp-config.php file from being overwritten in the future, you can use a file manager or FTP client to set the file permissions to “read-only”. This will prevent WordPress from making any changes to the file, including during updates.

    Here are the steps to set the wp-config.php file to read-only:

    1. Connect to your website using an FTP client or file manager.
    2. Locate the wp-config.php file in the root directory of your WordPress installation.
    3. Right-click on the wp-config.php file and select “File Permissions” or “Properties”.
    4. Change the file permissions to “444” or “644”. This will set the file to read-only mode, which will prevent WordPress from making any changes to it.
    5. Save the changes and close the file manager or FTP client.

    By setting the wp-config.php file to read-only, you can ensure that your custom configurations are preserved during WordPress updates. However, if you need to make any changes to the file in the future, you will need to temporarily set the file permissions to “read-write” and then change them back to “read-only” after you have made your changes.

    Thread Starter amslps

    (@amslps)

    Thank you for great details! I checked I previously set wp-config.php as -r–r—–, 440

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Will wp automatic update override my current wp-config.php?’ is closed to new replies.