{"id":316,"date":"2009-11-23T19:50:43","date_gmt":"2009-11-23T18:50:43","guid":{"rendered":"http:\/\/www.ewerkzeug.info\/?p=316"},"modified":"2022-04-10T14:03:50","modified_gmt":"2022-04-10T12:03:50","slug":"wordpress-file-upload-problems","status":"publish","type":"post","link":"https:\/\/www.ewerkzeug.info\/en\/wordpress-dateiupload-probleme\/","title":{"rendered":"WordPress file upload problems"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><mark style=\"background-color:var(--theme-palette-color-7, #FAFBFC)\" class=\"has-inline-color has-palette-color-1-color\">Update of the article: 2022-04-10<\/mark><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes it can happen. On the same server on which several WordPress blogs are installed side by side, uploading files to a WordPress website does not work. And not around the castle. So there are no excuses about safe mode=on or file uploads not being possible. It works on the neighboring sites, but not on this one installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Regardless of whether you upload via the media library or when creating a new article or page: the upload will start, but the file will not end up in the <code>uploads<\/code>-folder. Even if the media library thinks otherwise. And it doesn't matter whether it was a picture or an MP3 file. What now?<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ein-hoffnungsschimmer-das-memory-limit\">A glimmer of hope - the memory limit?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Perhaps the upload problem only affects images. After an image has been uploaded, it is processed by WordPress and smaller versions of the image are created. However, this cannot work if the working memory is too small. This concerns <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>the total amount of memory that is released for the execution of the PHP programming language for your website (PHP memory limit), <\/li><li>the memory available to the frontend of your WordPress website (WP memory limit), <\/li><li>and the memory available to the backend of your WordPress website (WP max memory limit),<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Let's take a look at the working memory available to your website, the <strong>PHP memory limit<\/strong>. With for example <code>memory_limit=64M<\/code> PHP is stored in the file <code>php.ini<\/code> is allocated a usable working memory of 64 MB. This may be sufficient for the usual use of a WordPress website with just a few plugins and a few widgets, but hardly more for editing larger images. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you can upload a small image (let's say with the dimensions 20 x 20 pixels) without encountering the problems of uploading a larger image, then you should set this memory limit higher. Or upgrade your hosting product if this means that you can work with a larger value for <code>memory_limit<\/code> be considered.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The value for the PHP memory limit can be found under \u201eTools \/ Website status \/ Reports \/ Server\u201c:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/php_memory_limit.png\"><img loading=\"lazy\" decoding=\"async\" width=\"796\" height=\"422\" src=\"https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/php_memory_limit.png\" alt=\"php_memory_limit\" class=\"wp-image-4606\" srcset=\"https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/php_memory_limit.png 796w, https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/php_memory_limit-300x159.png 300w, https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/php_memory_limit-768x407.png 768w\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" \/><\/a><figcaption>php_memory_limit<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">However, it may also be the case that your WordPress is saving too little memory (WP_MAX_MEMORY_LIMIT) for the <strong>Backend<\/strong> conceded. You can then correct this yourself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use FTP to download the file <code>wp-config.php<\/code>&nbsp;from your web server to your own computer. You will find this file in the top directory of the website. With good providers, you can also edit the file directly in your customer administration area (the section is most likely called FTP or Web FTP). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open the file in a text editor (Windows: Editor, <a rel=\"noreferrer noopener\" href=\"https:\/\/notepad-plus-plus.org\/downloads\/\" target=\"_blank\">Notepad++<\/a>or similar; MacOS: TextEdit or similar). <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Search for the line <code>\/* That's all, stop editing! Happy publishing. *\/<\/code> resp. <code>\/* That's it, no more editing! Have fun. *\/<\/code>and insert the following line immediately before it. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>define( 'WP_MAX_MEMORY_LIMIT', '256M'<\/code> <code>);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With this line, you instruct WordPress to set the WP memory limit for the backend area to 256MB. Perhaps you have even booked a higher-quality hosting product, in which case you can <code>512M<\/code> enter.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the <strong>Front end<\/strong> WordPress websites do not usually require that much RAM, so 64MB is certainly enough at the moment.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>define( 'WP_MEMORY_LIMIT', '64M'<\/code> <code>);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now save and upload the file to your server again. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now check in the backend of your WordPress website under \u201eTools \/ Website status \/ Reports \/ WordPress constants\u201c to see if you were successful.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/wp_memory_limit.png\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"351\" src=\"https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/wp_memory_limit.png\" alt=\"wp_memory_limit\" class=\"wp-image-4604\" srcset=\"https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/wp_memory_limit.png 793w, https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/wp_memory_limit-300x133.png 300w, https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/wp_memory_limit-768x340.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/a><figcaption>The two WP memory limits<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If this is not yet the case, please contact your hosting provider and ask them to allocate more memory (PHP memory limit) to your website. This is because the WP memory limit cannot exceed the PHP memory limit. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"oder-die-dateirechte\">Or the file rights?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The file permissions on the server may not be set optimally. In order for photos to be uploaded, the wp-content\/uploads folder must be writable, including all its subfolders. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\" id=\"standard-dateiberechtigungen-fr-die-meisten-wordpress-dateienordner\">The default file permissions for most WordPress files\/folders are as follows:<a href=\"https:\/\/kinsta.com\/de\/blog\/wordpress-berechtigungen\/#standard-dateiberechtigungen-fr-die-meisten-wordpress-dateienordner\"><\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Files<\/strong>: 644<\/li><li><strong>Folder<\/strong>: 755<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Connect with an FTP program (<a href=\"https:\/\/filezilla-project.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">FileZilla<\/a>) to your server, locate the wp-content\/uploads folder, right-click on it and set the file permissions for the directory and its subdirectories to 755.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><a href=\"https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/dateirechte_uploads.png\"><img loading=\"lazy\" decoding=\"async\" width=\"304\" height=\"425\" src=\"https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/dateirechte_uploads.png\" alt=\"\" class=\"wp-image-4610\" srcset=\"https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/dateirechte_uploads.png 304w, https:\/\/www.ewerkzeug.info\/wp-content\/uploads\/dateirechte_uploads-215x300.png 215w\" sizes=\"auto, (max-width: 304px) 100vw, 304px\" \/><\/a><figcaption>File permissions for the \u201euploads\u201c directory\u201c<\/figcaption><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If this does not work either (does your provider have a special construction?), then try 777 for this directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"klappt-es\">Does it work?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the upload of picture and sound works again, please write a hymnic comment here. If it doesn't work, but you have found another solution, please let us know.<\/p>","protected":false},"excerpt":{"rendered":"<p>Aktualisierung des Beitrags: 2022-04-10 Manchmal kann es passieren. Auf dem selben Server, auf dem einige WordPress-Blogs nebeneinander installiert sind, klappt das Hochladen von Dateien bei einer WordPress-Website nicht. Und zwar nicht um die Burg. Da gibt&#8217;s also keine Ausreden von wegen Safe-Mode=on oder Datei-Upload grunds\u00e4tzlich nicht m\u00f6glich. Bei den Nachbar-Sites klappt es ja, nur nicht [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_titles_title":"Wordpress Dateiupload Probleme","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"none","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"both","_seopress_redirections_param":"","_seopress_redirections_type":301,"_seopress_analysis_target_kw":"","_seopress_news_disabled":"","_seopress_video_disabled":"","_seopress_video":[],"_seopress_pro_schemas_manual":[],"_seopress_pro_rich_snippets_disable_all":"","_seopress_pro_rich_snippets_disable":[],"_seopress_pro_schemas":[],"iawp_total_views":463,"footnotes":""},"categories":[48],"tags":[],"class_list":["post-316","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":5,"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":4621,"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/posts\/316\/revisions\/4621"}],"wp:attachment":[{"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ewerkzeug.info\/en\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}