WordPress: Difference between revisions
add recommended file permissions |
Backup process Tag: visualeditor |
||
(2 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== Recommended file permissions == | == Recommended file permissions == | ||
* ''Last tested on CentOS 7 (2018/4/22)'' | |||
Private WordPress installations seem to be the drum that hackers like to hit on these days. It seems that many themes are also vulnerable as well. Anyway, as a starting point for fortifying a WP installation here are recommended file permissions settings for a WordPress installation on a Linux box. These commands will set 750 for all folders, 640 for files, and 600 for wp-config.php file. Sitting with a root/sudo access on a parent folder from a WP installation folder (assuming wpfolder here). | Private WordPress installations seem to be the drum that hackers like to hit on these days. It seems that many themes are also vulnerable as well. Anyway, as a starting point for fortifying a WP installation here are recommended file permissions settings for a WordPress installation on a Linux box. These commands will set 750 for all folders, 640 for files, and 600 for wp-config.php file. Sitting with a root/sudo access on a parent folder from a WP installation folder (assuming wpfolder here). | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# find wpfolder -type d -exec chmod 750 {} + | # sudo find wpfolder -type d -exec chmod 750 {} + | ||
# find wpfolder -type f -exec chmod 640 {} + | |||
# chmod 600 wpfolder/wp-config.php | # sudo find wpfolder -type f -exec chmod 640 {} + | ||
<syntaxhighlight> | |||
# sudo chmod 600 wpfolder/wp-config.php | |||
</syntaxhighlight> | |||
== Backup process == | |||
* ''Last tested on Ubuntu 20.04.4 (2022/03/07)'' | |||
Backup database<syntaxhighlight lang="bash"> | |||
$ cd /www/blog-backup/ | |||
$ mysqldump --add-drop-table -u root -p mhanwp1 > 20220307-backup.sql | |||
</syntaxhighlight>Backup files<syntaxhighlight lang="bash"> | |||
$ tar zcvf 20220307.tar.gz /www/blog | |||
</syntaxhighlight> |
Latest revision as of 21:30, 7 March 2022
- Installation
- My notes taken while installing WordPress 4.1.1 on Ubuntu 14.04.02 LTS (CLi)
Recommended file permissions
- Last tested on CentOS 7 (2018/4/22)
Private WordPress installations seem to be the drum that hackers like to hit on these days. It seems that many themes are also vulnerable as well. Anyway, as a starting point for fortifying a WP installation here are recommended file permissions settings for a WordPress installation on a Linux box. These commands will set 750 for all folders, 640 for files, and 600 for wp-config.php file. Sitting with a root/sudo access on a parent folder from a WP installation folder (assuming wpfolder here).
# sudo find wpfolder -type d -exec chmod 750 {} +
# sudo find wpfolder -type f -exec chmod 640 {} +
# sudo chmod 600 wpfolder/wp-config.php
Backup process
- Last tested on Ubuntu 20.04.4 (2022/03/07)
Backup database
$ cd /www/blog-backup/
$ mysqldump --add-drop-table -u root -p mhanwp1 > 20220307-backup.sql
Backup files
$ tar zcvf 20220307.tar.gz /www/blog