Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Wie man die maximale Datei-Upload-Größe in WordPress erhöht

Unsere Besucher bitten uns häufig um Hilfe bei der Lösung von Problemen im Zusammenhang mit Einschränkungen beim Upload von Dateien. Diese einfache Website-Einstellung kann unerwartete Auswirkungen auf Ihre Website haben.

Zum Beispiel kann eine niedrige Grenze für die Datei-Upload-Größe Sie manchmal daran hindern, Dateien mit dem Media-Uploader hochzuladen oder größere WordPress Plugins und Themes zu installieren. Das kann sehr frustrierend sein, vor allem wenn Sie nicht wissen, wie Sie das Limit ändern können.

In diesem Artikel zeigen wir Ihnen, wie Sie die maximale Größe für den Upload von Dateien in WordPress einfach erhöhen können, um diese Probleme zu beheben.

How to increase the maximum file upload size in WordPress

Warum die maximale Datei-Upload-Größe in WordPress erhöhen?

Ihr WordPress Hosting-Anbieter legt einen Standard für die maximale Größe des Uploads von Dateien fest, wenn Sie sich anmelden und WordPress installieren. Ihr Hosting-Anbieter legt diese Grenze fest, die normalerweise zwischen 2 MB und 500 MB liegt.

Für die meisten Betreiber von WordPress-Websites ist dieses Limit mehr als ausreichend.

Es kann jedoch vorkommen, dass Sie diese Grenze anheben müssen, um Upload-Fehler zu vermeiden.

Zum Beispiel:

  • Sie betreiben eine Fotografie-Website und müssen große Bilder hochladen.
  • Ihr Design- oder Fotografie-Portfolio enthält große Bilder.
  • Sie möchten ein größeres WordPress-Theme oder -Plugin installieren.
  • Sie möchten digitale Produkte wie eBooks, Fotos, Videos und mehr verkaufen.
  • Sie aktualisieren regelmäßig Inhalte und fügen Audio, Fotos und mehr hinzu, die über das aktuelle Limit hinausgehen.

In diesem Sinne zeigen wir Ihnen, wie Sie die maximale Datei-Upload-Größe auf Ihrer WordPress-Website erhöhen können.

Hinweis: Denken Sie daran, dass die Anzeige vieler großer Dateien auf Ihrer Website deren Geschwindigkeit und Leistung erheblich beeinträchtigen kann. Deshalb empfehlen wir in der Regel, keine Videos in WordPress hochzuladen.

Da die meisten Benutzer unterschiedliche WordPress-Hosting-Konfigurationen haben, werden wir die folgenden Punkte behandeln:

Video-Anleitung

Subscribe to WPBeginner

Wenn Sie eine schriftliche Anleitung bevorzugen, dann lesen Sie einfach weiter.

Wie Sie die maximale Datei-Upload-Größe in WordPress überprüfen

WordPress zeigt automatisch die maximale Dateigröße an, wenn Sie Bilder oder andere Medien hochladen.

Um dies zu überprüfen, gehen Sie einfach auf Medien “ Neu hinzufügen in Ihrem WordPress-Administrationspanel, und Sie werden die maximale Datei-Upload-Größe für Ihre WordPress-Website zu sehen.

Check current file upload size limit

Da Sie nun wissen, wie Sie das Größenlimit finden können, zeigen wir Ihnen, wie Sie die maximale Upload-Größe in WordPress erhöhen können.

Methode 1: Kontaktieren Sie Ihren WordPress-Hosting-Anbieter

Eine der einfachsten Möglichkeiten, die maximale Datei-Upload-Größe in WordPress zu erhöhen, besteht darin, sich an Ihren WordPress-Hosting-Anbieter zu wenden.

Dies ist eine relativ einfache Aufgabe für das Kundendienstteam und kann in wenigen Minuten erledigt werden.

Für Anfänger kann dies viel einfacher sein als das Hinzufügen von Code zu WordPress und das Bearbeiten von Serverdateien.

Gehen Sie einfach auf die Website Ihres Hosting-Anbieters, z. B. Bluehost, und melden Sie sich an.

Klicken Sie dann auf das Symbol „Chat“ am unteren Rand der Ansicht. Sie können dann die Support-Mitarbeiter bitten, die Größe des Uploads von Dateien auf Ihrer WordPress Website zu erhöhen.

Clicking the Bluehost live chat support button in the dashboard

Sie können sich auch über das Dashboard Ihres Hosting-Kontos an den Support wenden.

Methode 2: Erstellen oder Bearbeiten einer vorhandenen php.ini-Datei

Eine weitere Möglichkeit, die maximale Datei-Upload-Größe zu erhöhen, besteht darin, eine Datei namens php.ini zu erstellen oder zu bearbeiten. Diese Datei steuert viele Einstellungen für Ihre WordPress-Hosting-Umgebung.

Die meisten WordPress-Hosting-Anbieter wie Bluehost bieten ein einsteigerfreundliches cPanel für die Verwaltung Ihrer Website.

Wenn Ihr Webhost über ein cPanel-Dashboard verfügt, können Sie die Größe der hochzuladenden Dateien mit den integrierten Tools erhöhen.

Hinweis: Die folgenden Angaben stammen aus dem Bluehost cPanel. Bei den meisten Shared-Hosting-Anbietern werden jedoch ähnliche Schritte durchgeführt.

Sie finden eine cPanel-Schaltfläche am unteren Rand der Registerkarte Hosting bei Bluehost.

Open cPanel in Bluehost

Wenn Sie auf diese Schaltfläche klicken, wird Ihr cPanel-Dashboard geöffnet.

Nun müssen Sie zum Abschnitt Software scrollen und auf „MultiPHP INI Editor“ klicken.

MuliPHP INI Editor in Bluehost's cPanel

Blättern Sie dann nach unten zum Abschnitt „upload_max_filesize“ und geben Sie eine neue maximale Dateigröße in das Feld ein.

Klicken Sie dann auf die Schaltfläche „Übernehmen“.

Upload Max Filesize Setting

Alternativ können Sie auch auf die Registerkarte „Editormodus“ klicken und dann die maximale Dateigröße direkt im Editor ändern.

Sie müssen den Abschnitt „upload_max_filesize“ bearbeiten, um die Größe der hochgeladenen Dateien zu erhöhen.

Wenn Sie fertig sind, klicken Sie einfach auf die Schaltfläche „Speichern“.

Change max upload filesize in code editor

php.ini durch Hinzufügen von Code bearbeiten

Wenn Ihr derzeitiger Hosting-Anbieter die cPanel-Option nicht anbietet, müssen Sie diese Datei manuell bearbeiten.

Dazu können Sie einen FTP-Client oder die Dateimanager-Option in Ihrem WordPress-Hosting-Kontrollpanel verwenden.

Wenn Sie ein gemeinsam genutztes Hosting-System verwenden, kann es sein, dass Sie die Datei php.ini nicht in Ihrem Hosting-Verzeichnis finden. Wenn Sie keine sehen, erstellen Sie einfach eine Datei namens php.ini und laden Sie sie in Ihr Stammverzeichnis hoch.

Fügen Sie dann den folgenden Codeschnipsel in die Datei ein:

upload_max_filesize = 256M
post_max_size = 256M
max_execution_time = 300

Sie können die Grenze von 256M“ an die Dateigröße anpassen, die Sie für Ihren WordPress-Blog benötigen.

Methode 3: Fügen Sie den Code in die Datei functions.php Ihres WordPress-Themes ein

Bei dieser Methode wird Code in die Datei functions.php Ihres WordPress-Themes eingefügt.

Anstatt die Datei direkt zu bearbeiten, empfehlen wir die Verwendung von WPCode. Es ist das beste Plugin für Codeschnipsel, mit dem Sie Code zu Ihrer Website hinzufügen können, ohne sie zu zerstören.

Wenn Sie dies noch nicht getan haben, lesen Sie unseren Leitfaden für Einsteiger, wie Sie benutzerdefinierten Code in WordPress hinzufügen.

Zunächst müssen Sie das kostenlose WPCode-Plugin installieren. Weitere Details finden Sie in unserer Schritt-für-Schritt-Anleitung für die Installation eines WordPress-Plugins.

Nach der Aktivierung sollten Sie zu Code-Snippets “ + Snippet hinzufügen navigieren. Fahren Sie mit der Maus über die Option „Eigenen Code hinzufügen“ und klicken Sie dann auf die Schaltfläche „Snippet verwenden“.

Add a Custom Snippet in WPCode

Auf dem nächsten Bildschirm müssen Sie Ihrem neuen Snippet einen Namen geben und den Codetyp in „PHP Snippet“ ändern.

Kopieren Sie dann den folgenden Codeschnipsel und fügen Sie ihn unter „Codevorschau“ ein. Stellen Sie sicher, dass Sie „256M“ in die maximale Dateigröße ändern, die Sie benötigen:

@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );
Save Your Custom Snippet in WPCode

Schalten Sie schließlich den Schalter oben auf „Aktiv“ und klicken Sie dann auf die Schaltfläche „Snippet speichern“. Der Code wird nun auf Ihrer Website ausgeführt.

Methode 4: Hinzufügen von Code zu Ihrer .htaccess-Datei

Eine weitere Möglichkeit, die maximale Dateigröße zu erhöhen, besteht in der Änderung der Datei .htaccess. Diese Datei steuert die übergeordneten Konfigurationseinstellungen für Ihre Website.

Dazu müssen Sie sich per FTP auf dem Server Ihrer Website anmelden. Wenn Sie dies noch nicht getan haben, lesen Sie unseren Leitfaden für Anfänger zum Hochladen von Dateien mit FTP auf WordPress.

Danach müssen Sie Ihre .htaccess-Datei im Stammverzeichnis Ihrer Website suchen.

Open .htaccess file

Wenn Sie Ihre .htaccess-Datei nicht finden können, könnte sie von Ihrem Dateimanager oder FTP-Client versteckt worden sein. Weitere Informationen finden Sie in unserem Leitfaden zur Frage , warum Sie die .htaccess-Datei auf Ihrer WordPress-Website nicht finden können.

Als nächstes müssen Sie den folgenden Codeschnipsel in Ihre .htaccess-Datei einfügen:

php_value upload_max_filesize 256M
php_value post_max_size 256M
php_value max_execution_time 300
php_value max_input_time 300

Um die maximale Dateigröße noch weiter zu erhöhen, ändern Sie einfach den Wert „64M“ auf die von Ihnen gewünschte Größe.

Methode 5: Verwenden Sie ein WordPress-Plugin, um die Datei-Upload-Größe zu erhöhen

Eine weitere Möglichkeit, die maximale Datei-Upload-Grenze zu erhöhen, ist die Verwendung des Plugins WP Increase Upload Filesize. Wenn Sie sich mit dem Hinzufügen von Code zu WordPress nicht wohlfühlen, dann könnte dies eine gute Option für Sie sein.

Als Erstes müssen Sie das Plugin installieren und aktivieren. Weitere Einzelheiten finden Sie in unserer Anleitung zur Installation eines WordPress-Plugins.

Navigieren Sie nach der Aktivierung zu Medien “ Upload-Limit erhöhen in Ihrem WordPress-Administrationsbereich.

Daraufhin wird ein Bildschirm angezeigt, auf dem Sie in der Dropdown-Liste „Maximale Dateigröße für den Upload wählen“ eine neue Dateigröße auswählen können.

Klicken Sie dann auf die Schaltfläche „Änderungen speichern“.

Increase file upload size with plugin

Hinweis: Die maximale Dateigröße für den Upload wird von Ihrem Hosting-Anbieter festgelegt. Wenn Sie eine höhere Dateigröße als die in der Dropdown-Liste angegebene benötigen, müssen Sie sich an Ihren Hosting-Anbieter wenden und um eine Erhöhung des Limits bitten.

Wir hoffen, dass dieser Artikel Ihnen geholfen hat, die maximale Datei-Upload-Größe in WordPress zu erhöhen. Vielleicht interessieren Sie sich auch für unseren Leitfaden zur Auswahl des besten Website-Builders und unsere Expertenauswahl der besten Apps für virtuelle Telefonnummern für Unternehmen mit kostenlosen Optionen.

Wenn Ihnen dieser Artikel gefallen hat, dann abonnieren Sie bitte unseren YouTube-Kanal für WordPress-Videotutorials. Sie können uns auch auf Twitter und Facebook finden.

Offenlegung: Unsere Inhalte werden von unseren Lesern unterstützt. Das bedeutet, dass wir möglicherweise eine Provision verdienen, wenn Sie auf einige unserer Links klicken. Mehr dazu erfahren Sie unter Wie WPBeginner finanziert wird , warum das wichtig ist und wie Sie uns unterstützen können. Hier finden Sie unseren redaktionellen Prozess .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Das ultimative WordPress Toolkit

Erhalte KOSTENLOSEN Zugang zu unserem Toolkit - eine Sammlung von WordPress-bezogenen Produkten und Ressourcen, die jeder Profi haben sollte!

Reader Interactions

406 KommentareEine Antwort hinterlassen

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Manish

    I am unable to import my blogger exported xml file to wordpress.
    My blogger imported xml file size is 24 mb.
    Please solve this problem, i shall be thankful to you.

  3. Hashim

    3. htaccess Method worked for me.

    Thanks

  4. John

    Has anyone ever told you that the copy and paste YOUR code all throughout your site always has the:

    1: code
    2: code
    3: code

    So it’s a bit of a edit to get it to work right when a simple copy/paste would be stressfree for your readers! Just sayin…

  5. John Delaney

    Create php.ini file and place it in wp-admin folder, not the root. Fixes it every time.

    • Michael Kelley

      Thanks! This is the only thing that worked for me. Worth noting, I already had a php5.ini file in there w/ the same code, it did nothing. A tad confusing.

  6. Robert

    After 2 hours of frustration, the htaccess method mentioned here worked out for my local environment.

    Thank you very much. :)

  7. Robin

    I change my .htaccess and put

    php_value memory_limit 2G
    php_value upload_max_filesize 2G
    php_value post_max_size 2G
    php_value max_execution_time 99999
    php_value max_input_time 99999

    when I go for upload a fine it shows 2GB but when I upload any file that larger then 128MB it shows HTTP error. Need help please.

    Thanks

    • Zain Zaheer

      Set max limit to 128M instead of 2G

  8. Robin

    I add on my .htaccess

    php_value memory_limit 2G
    php_value upload_max_filesize 2G
    php_value post_max_size 2G
    php_value max_execution_time 99999
    php_value max_input_time 99999

    and it shows 2GB but when I upload larger then 128M file it gives me HTTP error. can anyone help me please.

    Thanks

  9. Elisabeth Parker

    I DO NOT recommend putting that code in the Theme Functions file. I tried it and it completely blew up my site. And if you don’t know how to use FTP or the File manager to change the Functions file BACK, you’ll be very unhappy. I haven’t tried the other options but if I find something that works I’ll let you know :)

    • kennedy Odhiambo

      Hello Elisabeth,ive tried it and it has also blown up my site,i cant acces it…may i please know how you fixed it?

  10. Caki

    Just contacted godaddy. I am using cpanel hosting through them. He added a file .user.ini in the public/html file with the following:

    memory_limit = 128M
    max_execution_time = 300
    post_max_size = 128M
    upload_max_filesize = 256M

    • razib ahmed

      thank you so much! it,s working for me

    • Tino

      I’m with Axxess and this also worked for me!

    • Paul Vijay

      Thanks a lots this Worked for me . I too use Godaddy Hosting, Still the Template fails to load from Online database can u help

    • Bob

      do you name it .user.ini or user.ini ??

    • Jesse

      This method worked for me! Thank you so much for sharing!!!

  11. Craig

    in the .htaccess solution, where in the file do you enter the code, i put it at the end and got a 500 error?

  12. Cornelius

    I heard as an alternative you could just directly upload via the ftp cpanel, but when I do that the PDF does not show up in my WP media dashboard?

    • WPBeginner Support

      Hi Cornelius,

      You can upload a PDF file but yes you are right it will not be visible in the Media library on your WordPress site. To see a file in the media library and be able to easily add it, you would need to upload it using the built in media uploader.

      Admin

      • Christopher Eller

        You can upload anything via FTP/SFTP and then add it to the database using a plugin like Add From Server.

  13. Nitus

    This worked for me (as nothing else would):

    – Open wp-config.php
    – At the very bottom add this line:

    define(‚WP_MEMORY_LIMIT‘, ‚128M‘);

    – Save (and upload your file)

  14. Maja

    So i’m not a developer so i dont feel like messing with php and some functional stuff.
    i found from a post above php settings and all is set right, max file size is 30MB so i’m confused why i still can’t upload media bigger than 5mb.
    is there a wordpress thing that i’m missing
    i didn’t find anywhere place to change that,

  15. Niall Flynn

    If you are using cPanel most of the time you edit via the PHP Version settings, you can check if you are on 5.6 or 7.0 and edit all the settings via cpanel. For me this is the only way my host has all the others locked down, but its real handy and there are simple ways to enable PHP modules and tweak any setting.

  16. yaser

    Thanks.

    This is what finally worked for me:

    In wp-config, before wp-settings:

    define( ‚WP_MEMORY_LIMIT‘, ‚256M‘ );
    define( ‚WP_MAX_MEMORY_LIMIT‘, ‚256M‘ );
    ini_set( ‚memory_limit‘, ‚256M‘ );

    In .htaccess:

    php_value memory_limit 256M
    php_value upload_max_filesize 64M
    php_value post_max_size 64M
    php_value max_execution_time 300
    php_value max_input_time 300

    • mohammad

      thanks man you made my day it worked

    • Evan Olsen

      This worked for me! Thank you!

    • Yna Capumpue

      How do you get to the wp-config? I mean where do you input the code itself? Thanks.

    • maneesh naithani

      made my day. thank you man.

  17. Rahadian

    Thank you for this valuable post, .htaccess method works for me

  18. Abhishek

    Thanx a lot php.ini option works thanx a lot :)

  19. Sean

    Hello

    I am building a woocommerce store for selling audio files. Some of my files are over 100MB so uploading straight from wordpress wont work. What I am trying to do is Upload the file to cpanel and than post that link in the downloadable product on WP. But I dont know how to do it. I view the file in cpanel and copy that link but that just takes the person to cpanel login. I dont know hot to get the link of my file in cpanel so others can download it when they buy a product?

    Do you have a tutorial on this?

    or can you help?

    Thanks

    • Ian

      You would need to look more into this because you would need security for that file url, generally the file url is accessible to everything and therefore can be downloaded without making a purchase.

  20. Larry Scott

    The second suggestion of creating a php.ini file works like a charm.

  21. john

    Absolutely DO NOT try to enter that code into the Theme Functions file!!!!! Now I am getting error messages and can’t get to the dashboard for my site. I won’t DARE try any of their other suggestions.

    • WPBeginner Support

      Hi John,

      You can easily edit your functions.php file using an FTP client to undo the changes you made.

      Admin

  22. Fred Preston

    Thanks. the .htaccess version worked for me. I just had to remember to show hidden files in my cpanel file manager.

  23. John

    Just wanted to say thanks. I’ve been able to solve three wordpress related issues in one day, all with help from this website. Kudos on the good work. :D

  24. David

    Thanks.
    The php.ini edits helped. I had to make sure to also up the post_max size as well. I failed to edit this on first update, and nothing changed. Edit all parameters and presto. Thanks again!

  25. Alyse

    Is there a specific place to add it in the theme functions file? The beginning? The end?

  26. Shambo

    Modifying .htaccess file worked for me. Thanks a lot..

  27. Celal Erdogdu

    It works, thank you.

  28. Bentham

    Thank you so much ,option one gave me a hint

  29. Mohsin

    .htaccess method worked for me. Thanks for this article.

  30. Aswani Somarajan

    It was great. Very helpful! Had to upload a theme, used the second method. added a ner php.ini file and the theme is installed. Thanks a lot :)

  31. John

    Thanks for helping

    making the changes in the .htaccess method made the website crash
    however changing the php.ini file worked for me.

  32. Don

    or try another method like mine,

    on cpanel > click the „select php version“ > then click „switch to php options“ > find the „upload_max_filesize“ then change it whatever you want.

    • Aoun

      Thanks…… Its very helpful and working perfectly

    • Jose

      Thnxs dude, you saved my job

    • Md Robiul Islam

      Thanks you so much… for your comment I fix my issue after try long time.. thanks a lot…..

    • Miaka

      The methods in the article didnt work for me but this did! Thank you so so much, Don! Article author, hope you could edit this method as one of the solutions in your article!

  33. Rudi

    Thank you so much, I used the htaccess Method and it’s worked for me.

  34. bob hildegard

    ‚upload_max_size‘ is not a php.ini variable name. it’s ‚upload_max_filesize‘. that’s stated wrong in solution 1

  35. Eric

    First thing I tried was modifying the .htaccess file. Worked for me!

  36. Reza

    htaccess option returns a 500 Internal Server error when reloading my website and wp admin

  37. kashyapkumbhani

    sir i Tried all But my Xml File Not Imported Please Help me:) thank u

  38. Trevor

    I tried your first suggestion, and apparently threw some bad code into the functions.php file and now I have lost access to my website’s dashboard, the actual website cannot be accessed by anyone, and the problem is obviously not solved.

  39. Aakarshit

    None of then worked ; (

    Even contacted the hosting provider, no reply from them ; (

  40. frizzy lee

    thanks .. the htacess method worked for me too .. thumbs up bro

  41. Okie Wardoyo

    Hi, where i should put that code to my .htaccess file.
    I have tried put this code to my htaccess file but it always 500 internal server error when i open my live site.

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    php_value max_input_vars 5000
    php_value max_execution_time 300
    php_value post_max_size 50M

    # END WordPress

    • John Jones

      Try this:

      php_value upload_max_filesize 50M
      php_value post_max_size 50M
      php_value max_execution_time 300
      php_value max_input_time 300

  42. Jitender Singh

    .htaccess works nicely.

  43. subodeep ray

    thanks .htaccess works smoothly :-)

  44. Bukunmi

    Where exactly do I put those codes in my Theme function? because i’m kind of lost

    • Galuh Prasetyawan

      in Appearance -> editor, find function.php

      • Eóin Kilroy

        Right, but where exactly in the function file?

  45. Manas Mitra

    Hi,

    I have used the first method of adding code to child theme functions.php file, but it does not have the desired effect. In localhost, the limit is 3 MB and in shared server, the limit is 32 MB. Any idea why it is happening so?

    Thanks.

  46. Bouguezzi

    the .htaccess modification methode worked with me :) thx a lot

  47. cathy belyea

    i have followed this even contacted my host increased my uploads to 64mb however in wordpress it still only allows 8mb.
    any other suggestions please help.

  48. Guillermo

    Same problem for wordpress 3.9 / 4 version and having a look to Chrome console or firefox I saw an error 413 of NGINX when uploading

    Maybe this thread can help to nginx users ;)

Schreibe einen Kommentar zu furqan Antworten abbrechen

Danke, dass du einen Kommentar hinterlassen möchtest. Bitte beachte, dass alle Kommentare nach unseren kommentarpolitik moderiert werden und deine E-Mail-Adresse NICHT veröffentlicht wird. Bitte verwende KEINE Schlüsselwörter im Namensfeld. Lass uns ein persönliches und sinnvolles Gespräch führen.