- This topic has 4 replies, 2 voices, and was last updated 5 years, 11 months ago by Andrew.
- June 29, 2014 at 2:24 pm #18088AndrewParticipant
One of my security measures on WordPress is to move the wp-config.php file up one folder level on the server, above the public html folder.
How can I get UpdraftPlus to back it up? Entering the full path to the file in the “Any other directory on your server that you wish to back up” options didn’t work, since Updraft is looking for a directory, not a file, and kicks out an error.
(my WordPress install is located here: /nfs/c04/h06/mnt/123456/domains/domainname.com/html/ )
AndrewJune 30, 2014 at 7:10 am #18815udadminKeymaster
You could enter the path to the directory, and then add the list of other entities in that directory as things to exclude from the backup. i.e. back up /nfs/c04/h06/mnt/123456/domains/domainname.com/wp-config.php and type in “html” in the list of things to exclude.
Note, though, that unless your wp-config.php contains something more than just your MySQL configuration, then you may not need to back it up.
DavidJuly 1, 2014 at 1:08 am #18822AndrewParticipant
Which “exclude” field should I use? There are exclusion fields for Uploads, WordPress Core, and within wp-content… but all of those would be below the /html/ directory…
(And I do customize wp-config.php – usually to lock out the WordPress File Editor and increase WP Memory Limits… Not mission critical, but would be nice to have in the backup sets so it is faster/easier to recover from a major catastrophe.)
AndrewJuly 1, 2014 at 7:53 am #18823udadminKeymaster
Ah, you’re right – there isn’t an exclude field for it.
I’ve just tweaked the code so that the next release of UpdraftPlus (due in around a fortnight) will allow you to specify single files for backup, and then you’ll be able to add the full path to the file.
DavidJuly 2, 2014 at 1:26 am #18824AndrewParticipant
Excellent – thanks David! :)
One other thought – what about tweaking UpDraft to look for wp-config.php one level above the WordPress installation, if the file doesn’t exist in the default location? Considering that it’s recommended in the Codex, it seems like a good thing to just include automatically with a backup.
- The topic ‘Backing up wp-config.php if it is above public_html folder’ is closed to new replies.