Today I noticed an alert that WordPress version 7.0.3 was available. I decided to update, but got the annoying prompt to enter FTP credentials. Usually, just running chown -R wwwrun /srv/www/htdocs would usually fix the issue, but not today. After digging around, I found I needed to add three lines to my wpconfig.php config file above the /* That’s all, stop editing! Happy publishing. */ line which resolved the issue.
define( ‘FS_CHMOD_DIR’, 0755);
define( ‘FS_CHMOD_FILE’, 0644);
define( ‘FS_METHOD’, ‘direct’);
The final line was the real kicker that made the function work again. FS_METHOD allows WordPress to write files directly to the filesystem without using FTP or SSH. Never needed it before, guess this is something new. Fun in the world of self-hosting.

All is good now, and I can now update my boring WordPress site again.
