Break the Rules and Ye Shall Pay

Apropos of nothing, I seem to have broken my WordPress configuration because I violated one of the fundamental tenets of computer systems administration: change only one thing at a time … test thoroughly before changing something else.

Well, this post is the test, but it’s already got problems in the editor.

I added a layer of security to my sites by making all the files and directories that did not have any reason to be written by WordPress or the web server owned by root. I figured that I could do upgrades and installs with sudo when necessary.

Recently I realized that if I wanted to use wp-cli to administer the site from the command line, that I would have to run it under sudo. Fortunately, the authors of that program don’t want you to run it as root. So I created a new Linux user and group to own all the files and directories that had been owned by root, changed the ownership and permissions, etc. Then used wp-cli to reinstall all the plugins, upgrade WP core, and update the database.

So that was how many changes before testing if any of them worked? 🙂  I did remember to make a full backup of the site at some point in the process … probably halfway through.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.