{"id":240,"date":"2025-01-11T18:23:20","date_gmt":"2025-01-11T14:23:20","guid":{"rendered":"http:\/\/keksus.com\/?p=240"},"modified":"2025-01-12T15:53:18","modified_gmt":"2025-01-12T11:53:18","slug":"linux-wordpress-permissions-after-install","status":"publish","type":"post","link":"https:\/\/hostatto.com\/blog\/linux-wordpress-permissions-after-install.html","title":{"rendered":"Linux WordPress permissions after install"},"content":{"rendered":"<p>After the WordPress installation was not <strong>403 Forbidden<\/strong> error, you need to go to the folder with the installed WordPress and change the owner of the folders and files.<\/p>\n<p>Now run the following commands by root user:<\/p>\n<blockquote><p>chown www-data:www-data -R *<\/p><\/blockquote>\n<p><strong>Notice:<\/strong> Where <strong>www-data<\/strong> it's your username and group directory, like this<\/p>\n<blockquote><p>chown username:group -R *<\/p><\/blockquote>\n<p>For all folders inside the WordPress directory, set permissions to 755<\/p>\n<blockquote><p>find . -type d -exec chmod 755 {} \\;<\/p><\/blockquote>\n<p><strong>755<\/strong> ( drwxr-xr-x ) everyone can read this directory, but only the owner can change its contents<\/p>\n<p>For all files inside the WordPress directory, set permissions to 644<\/p>\n<blockquote><p>find . -type f -exec chmod 644 {} \\;<\/p><\/blockquote>\n<p><strong>644<\/strong> (-rw-r--r--) only the owner has read and write permission, group and others have read-only access<\/p>\n","protected":false},"excerpt":{"rendered":"<p>...<\/p>\n","protected":false},"author":1,"featured_media":506,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-240","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/comments?post=240"}],"version-history":[{"count":0,"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/posts\/240\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/media\/506"}],"wp:attachment":[{"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/media?parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/categories?post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostatto.com\/blog\/wp-json\/wp\/v2\/tags?post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}