How to reliably set file/folder permissions?

FS_CHMOD_FILE and FS_CHMOD_DIR are applicable only if both of the following criteria are satisfied … the host allows the change in permissions (for an explanation on this, please see https://superuser.com/a/767261 ) the files are created by WordPress (such as WordPress core updates / upgrades, plugin installations / updates, theme installations / updates, or user uploaded … Read more

When clicking on “home” page from any other page, it goes to IP address and my website doesn’t load

The URLs are greyed out in the Settings page because of the entries in the wp-config.php file. If there are entries for these values, those values override the values in the wp-options table, and the override makes the Settings values uneditable. See this in the Codex: https://wordpress.org/support/article/changing-the-site-url/ It is possible to set the site URL … Read more

Force SSL using FORCE_SSL_ADMIN

If you are using docker-compose and the WORDPRESS_EXTRA_CONFIG as I was, when I stumbled across that error, the solution would be to use double-dollar-sign notation as described in a corresponding issue in the docker-compose repo on GitHub. This additional environment variable is described in the “How to use this image” of the official image documentation … Read more

What Does this Code Snippet Do?

The first part (add_filter()) tells WordPress to use the direct-write method. The second part (define()) tells WordPress to apply 0751 permissions to any directory it creates. More information here. I would not consider using the Direct Write method to be safe to use in a live, public, shared-hosting environment. Also, it might not – and … Read more