{"id":311,"date":"2013-04-18T22:43:14","date_gmt":"2013-04-18T20:43:14","guid":{"rendered":"http:\/\/bergs.biz\/blog\/?p=311"},"modified":"2013-04-18T22:43:14","modified_gmt":"2013-04-18T20:43:14","slug":"solved-wordpress-on-debian-and-media-uploads-not-working","status":"publish","type":"post","link":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/","title":{"rendered":"Solved: WordPress on Debian and media uploads not working"},"content":{"rendered":"<p>I was struggling with a problem that I couldn&#8217;t upload media files to my blog &#8212; which I host myself on a Debian box in a multi-site configuration. When I tried to do so I got an error message saying that WordPress couldn&#8217;t write to the directory. Actually I had this very problem since 2005 when I started this blog &#8212; I never took the time to <em>really<\/em> investigate it (but used the work-around to refer to static content I manually uploaded to my web-server document directory)&#8230; \ud83d\ude09<\/p>\n<p>Now that my wife wanted to start blogging, I finally had a good reason to fix this issue. It took me about an hour, and it was done. What I had to do was just two entries in my admin&#8217;s Settings (I might not have set up WordPress cleanly when I started it, so you might not have to manually set this) as follows:<\/p>\n<p><a href=\"http:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/mediasettings\/\" rel=\"attachment wp-att-314\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-314\" title=\"Media Settings\" src=\"http:\/\/bergs.biz\/blog\/files\/2013\/04\/MediaSettings.png\" alt=\"\" width=\"741\" height=\"648\" srcset=\"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2013\/04\/MediaSettings.png 741w, https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2013\/04\/MediaSettings-150x131.png 150w, https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2013\/04\/MediaSettings-300x262.png 300w, https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2013\/04\/MediaSettings-343x300.png 343w\" sizes=\"auto, (max-width: 741px) 100vw, 741px\" \/><\/a>And then I needed one Alias in my Apache configuration to redirect the URL prefix to a directory under my web-server document root:<\/p>\n<pre># \"Intercepts\" files prefix and redirect to \"local\" (user's) directory\r\nAlias \/blog\/files \/home\/rabe\/var\/www\/bergs.biz\/blog\/files\r\n# This is the prefix to the root of my blog\r\nAlias \/blog \/usr\/share\/wordpress<\/pre>\n<p>That&#8217;s it! Sometimes things are so easy, and it only takes a short while to fix them&#8230; \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was struggling with a problem that I couldn&#8217;t upload media files to my blog &#8212; which I host myself on a Debian box in a multi-site configuration. When I tried to do so I got an error message saying that WordPress couldn&#8217;t write to the directory. Actually I had this very problem since 2005 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[75,74,73],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-debian","tag-media-upload","tag-multi-site","tag-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Solved: WordPress on Debian and media uploads not working - Ralf&#039;s Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Solved: WordPress on Debian and media uploads not working - Ralf&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"I was struggling with a problem that I couldn&#8217;t upload media files to my blog &#8212; which I host myself on a Debian box in a multi-site configuration. When I tried to do so I got an error message saying that WordPress couldn&#8217;t write to the directory. Actually I had this very problem since 2005 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/\" \/>\n<meta property=\"og:site_name\" content=\"Ralf&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2013-04-18T20:43:14+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/bergs.biz\/blog\/files\/2013\/04\/MediaSettings.png\" \/>\n<meta name=\"author\" content=\"Ralf Bergs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ralfbergs\" \/>\n<meta name=\"twitter:site\" content=\"@ralfbergs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ralf Bergs\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/\"},\"author\":{\"name\":\"Ralf Bergs\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#\\\/schema\\\/person\\\/354e37390b493c875f972bd313d29201\"},\"headline\":\"Solved: WordPress on Debian and media uploads not working\",\"datePublished\":\"2013-04-18T20:43:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/\"},\"wordCount\":205,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#\\\/schema\\\/person\\\/354e37390b493c875f972bd313d29201\"},\"image\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/bergs.biz\\\/blog\\\/files\\\/2013\\\/04\\\/MediaSettings.png\",\"keywords\":[\"media upload\",\"multi-site\",\"WordPress\"],\"articleSection\":[\"Debian\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/\",\"url\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/\",\"name\":\"Solved: WordPress on Debian and media uploads not working - Ralf&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/bergs.biz\\\/blog\\\/files\\\/2013\\\/04\\\/MediaSettings.png\",\"datePublished\":\"2013-04-18T20:43:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/#primaryimage\",\"url\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/04\\\/MediaSettings.png\",\"contentUrl\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/04\\\/MediaSettings.png\",\"width\":\"741\",\"height\":\"648\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/2013\\\/04\\\/18\\\/solved-wordpress-on-debian-and-media-uploads-not-working\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Solved: WordPress on Debian and media uploads not working\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/\",\"name\":\"Ralf's Blog\",\"description\":\"Just another WordPress weblog\",\"publisher\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#\\\/schema\\\/person\\\/354e37390b493c875f972bd313d29201\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/#\\\/schema\\\/person\\\/354e37390b493c875f972bd313d29201\",\"name\":\"Ralf Bergs\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Ralf-Tower-2026-1024x1024.jpg\",\"url\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Ralf-Tower-2026-1024x1024.jpg\",\"contentUrl\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Ralf-Tower-2026-1024x1024.jpg\",\"width\":1024,\"height\":1024,\"caption\":\"Ralf Bergs\"},\"logo\":{\"@id\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/Ralf-Tower-2026-1024x1024.jpg\"},\"description\":\"Geek, computer guy, licensed and certified electrical and computer engineer, husband, best daddy.\",\"sameAs\":[\"https:\\\/\\\/bergs.biz\\\/\",\"https:\\\/\\\/linkedin.com\\\/in\\\/ralfbergs\\\/\",\"https:\\\/\\\/x.com\\\/ralfbergs\"],\"url\":\"https:\\\/\\\/bergs.biz\\\/blog\\\/author\\\/rabe\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Solved: WordPress on Debian and media uploads not working - Ralf&#039;s Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/","og_locale":"en_US","og_type":"article","og_title":"Solved: WordPress on Debian and media uploads not working - Ralf&#039;s Blog","og_description":"I was struggling with a problem that I couldn&#8217;t upload media files to my blog &#8212; which I host myself on a Debian box in a multi-site configuration. When I tried to do so I got an error message saying that WordPress couldn&#8217;t write to the directory. Actually I had this very problem since 2005 [&hellip;]","og_url":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/","og_site_name":"Ralf&#039;s Blog","article_published_time":"2013-04-18T20:43:14+00:00","og_image":[{"url":"http:\/\/bergs.biz\/blog\/files\/2013\/04\/MediaSettings.png","type":"","width":"","height":""}],"author":"Ralf Bergs","twitter_card":"summary_large_image","twitter_creator":"@ralfbergs","twitter_site":"@ralfbergs","twitter_misc":{"Written by":"Ralf Bergs","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/#article","isPartOf":{"@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/"},"author":{"name":"Ralf Bergs","@id":"https:\/\/bergs.biz\/blog\/#\/schema\/person\/354e37390b493c875f972bd313d29201"},"headline":"Solved: WordPress on Debian and media uploads not working","datePublished":"2013-04-18T20:43:14+00:00","mainEntityOfPage":{"@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/"},"wordCount":205,"commentCount":0,"publisher":{"@id":"https:\/\/bergs.biz\/blog\/#\/schema\/person\/354e37390b493c875f972bd313d29201"},"image":{"@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/#primaryimage"},"thumbnailUrl":"http:\/\/bergs.biz\/blog\/files\/2013\/04\/MediaSettings.png","keywords":["media upload","multi-site","WordPress"],"articleSection":["Debian"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/","url":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/","name":"Solved: WordPress on Debian and media uploads not working - Ralf&#039;s Blog","isPartOf":{"@id":"https:\/\/bergs.biz\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/#primaryimage"},"image":{"@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/#primaryimage"},"thumbnailUrl":"http:\/\/bergs.biz\/blog\/files\/2013\/04\/MediaSettings.png","datePublished":"2013-04-18T20:43:14+00:00","breadcrumb":{"@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/#primaryimage","url":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2013\/04\/MediaSettings.png","contentUrl":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2013\/04\/MediaSettings.png","width":"741","height":"648"},{"@type":"BreadcrumbList","@id":"https:\/\/bergs.biz\/blog\/2013\/04\/18\/solved-wordpress-on-debian-and-media-uploads-not-working\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bergs.biz\/blog\/"},{"@type":"ListItem","position":2,"name":"Solved: WordPress on Debian and media uploads not working"}]},{"@type":"WebSite","@id":"https:\/\/bergs.biz\/blog\/#website","url":"https:\/\/bergs.biz\/blog\/","name":"Ralf's Blog","description":"Just another WordPress weblog","publisher":{"@id":"https:\/\/bergs.biz\/blog\/#\/schema\/person\/354e37390b493c875f972bd313d29201"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bergs.biz\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/bergs.biz\/blog\/#\/schema\/person\/354e37390b493c875f972bd313d29201","name":"Ralf Bergs","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2026\/04\/Ralf-Tower-2026-1024x1024.jpg","url":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2026\/04\/Ralf-Tower-2026-1024x1024.jpg","contentUrl":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2026\/04\/Ralf-Tower-2026-1024x1024.jpg","width":1024,"height":1024,"caption":"Ralf Bergs"},"logo":{"@id":"https:\/\/bergs.biz\/blog\/wp-content\/uploads\/2026\/04\/Ralf-Tower-2026-1024x1024.jpg"},"description":"Geek, computer guy, licensed and certified electrical and computer engineer, husband, best daddy.","sameAs":["https:\/\/bergs.biz\/","https:\/\/linkedin.com\/in\/ralfbergs\/","https:\/\/x.com\/ralfbergs"],"url":"https:\/\/bergs.biz\/blog\/author\/rabe\/"}]}},"_links":{"self":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":8,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":320,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/posts\/311\/revisions\/320"}],"wp:attachment":[{"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bergs.biz\/blog\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}