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 den 404-Fehler bei WordPress-Beiträgen behebt (Schritt für Schritt)

Hinweis der Redaktion: Wir erhalten eine Provision für Partnerlinks auf WPBeginner. Die Provisionen haben keinen Einfluss auf die Meinung oder Bewertung unserer Redakteure. Erfahre mehr über Redaktioneller Prozess.

Geben Ihre WordPress-Beiträge auf Ihrer Website einen 404-Fehler zurück?

Dieser Fehler tritt auf, wenn Sie auf Ihren WordPress-Administrationsbereich und Ihr Blog zugreifen können, aber wenn Sie versuchen, einen Beitrag zu öffnen, wird „404 Not Found“ angezeigt.

In diesem Artikel zeigen wir Ihnen, wie Sie WordPress-Beiträge mit 404-Fehlern beheben können.

How to fix WordPress posts returning 404 error

Warum erhalten meine WordPress-Beiträge einen 404-Fehler?

Es gibt mehrere Gründe, warum Ihre WordPress-Beiträge einen 404 „Seite nicht gefunden“-Fehler anzeigen. Diese können sein:

  • Konflikte mit Plugins oder Themes: Manchmal können Plugins oder Themes, die Sie auf Ihrer Website installiert haben, die Handhabung von Permalinks durch WordPress beeinträchtigen. Dies kann zu fehlerhaften Links und 404-Fehlern führen.
  • Probleme mit benutzerdefiniertem Code: Wenn Sie Ihrer Website benutzerdefinierten Code hinzugefügt haben, kann es sein, dass der Code Fehler enthält, die sich auf Permalinks auswirken oder andere Konflikte verursachen, was zu 404-Fehlern für Ihre Beiträge führt.
  • Probleme mit Ihrer .htaccess-Datei: Die .htaccess-Datei spielt eine Rolle dabei, wie WordPress URLs strukturiert. Wenn diese Datei beschädigt ist oder fehlt, kann dies zu 404-Fehlern für Ihre Beiträge führen.

Sehen wir uns also an, wie man WordPress-Beiträge mit 404-Fehlern beheben kann. Sie können die Links unten verwenden, um direkt zu den verschiedenen Lösungen zu springen:

Video-Anleitung

Subscribe to WPBeginner

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

Methode 1: Suchen Sie nach Plugin- oder Theme-Konflikten und benutzerdefinierten Code-Problemen

Manchmal können Plugins, Themes oder benutzerdefinierter Code, den Sie zu Ihrer WordPress-Website hinzugefügt haben, Permalinks beeinträchtigen oder Konflikte verursachen, die zu 404-Fehlern führen. Wir haben das sogar schon selbst erlebt, als wir Tools auf unserer Demo-Website getestet haben.

Eine Möglichkeit, dieses Problem zu lösen, besteht darin, Plugins vorübergehend zu deaktivieren. Plugins können manchmal stören, wie WordPress mit Links umgeht.

Nachdem Sie die Plugins deaktiviert haben, können Sie sie nacheinander reaktivieren und dabei überprüfen, ob der 404-Fehler nach der Aktivierung der einzelnen Plugins erneut auftritt. Wenn der Fehler nach der Aktivierung eines bestimmten Plugins auftritt, könnte dieses der Übeltäter sein.

Sie können dann nach Lösungen für dieses Plugin suchen oder den Plugin-Entwickler um Unterstützung bitten.

Auch Ihr WordPress-Theme könnte die Ursache für den Konflikt sein.

Um das zu überprüfen, können Sie vorübergehend zu einem Standard-WordPress-Theme wie Twenty Twenty-Three oder Twenty Twenty-Four wechseln. Dazu müssen Sie nur auf Darstellung Themes gehen und bei einem Standard-Theme auf „Aktivieren“ klicken.

Activating a default WordPress theme

Wenn der 404-Fehler mit dem Standard-Theme verschwindet, deutet dies auf einen möglichen Konflikt mit Ihrem aktuellen Theme hin. Sie können dann versuchen, das Problem mit dem Theme zu beheben oder ein anderes Theme zu verwenden.

In unserer Expertenauswahl der beliebtesten WordPress-Themes finden Sie Empfehlungen.

Wenn Sie kürzlich Codeschnipsel in Ihre Website eingefügt haben, kann es sein, dass der Code Fehler enthält, die die 404-Fehler verursachen. Schauen Sie sich den hinzugefügten Code genau an und prüfen Sie, ob Sie Fehler finden können.

Der sicherste Weg, Code-Schnipsel in WordPress einzufügen, ist das WPCode-Plugin. Mit diesem Plugin können Sie benutzerdefinierten Code einfügen, ohne direkt mit den Themadateien zu arbeiten, wodurch das Risiko, dass Ihre Website beschädigt wird, verringert wird.

Und wenn WPCode einen Fehler in Ihrem Code entdeckt, wird das Snippet automatisch deaktiviert und Sie werden aufgefordert, es zu überprüfen. Sie können auch den Testmodus verwenden, um zu prüfen, ob Ihr Code funktioniert, bevor Sie ihn auf Ihre Live-Website übertragen.

WPCode error warning

Wenn keine dieser Lösungen funktioniert, fahren Sie mit der nächsten Methode fort, bei der wir Ihre Permalink-Einstellungen überprüfen werden.

WordPress-Beiträge können aufgrund von Problemen mit Rewrite-Regeln in Ihrer .htaccess-Datei 404-Fehler zurückgeben. In den meisten Fällen können Sie das Problem beheben, indem Sie Ihre Permalink-Einstellungen aktualisieren.

Gehen Sie einfach zu Einstellungen “ Permalinks in Ihrem WordPress-Admin und klicken Sie auf die Schaltfläche „Änderungen speichern“.

Check Permalinks

Es ist nicht notwendig, die Permalink-Einstellungen selbst zu ändern. Dadurch werden Ihre Permalink-Einstellungen aktualisiert und die Rewrite-Regeln geleert.

In den meisten Fällen behebt diese Lösung den 404-Fehler bei WordPress-Beiträgen. Wenn es bei Ihnen jedoch nicht funktioniert, müssen Sie wahrscheinlich Ihre .htaccess-Datei manuell aktualisieren.

Methode 3: Aktualisieren der WordPress-.htaccess-Datei

Bevor Sie beginnen, sollten Sie eine Sicherungskopie Ihrer WordPress.htaccess-Datei erstellen. Wenn etwas schief geht, können Sie die ursprüngliche Datei leicht wiederherstellen.

Nun müssen Sie eine Verbindung zu Ihrem Server herstellen, indem Sie einen FTP-Client wie FileZilla oder die Dateimanager-App in Ihrem WordPress-Hosting-Dashboard verwenden.

Als Nächstes müssen Sie die Datei .htaccess finden und bearbeiten, die sich am selben Ort wie die Ordner /wp-content/ und /wp-includes/ befindet.

Klicken Sie einfach mit der rechten Maustaste auf die Datei und wählen Sie „Dateiberechtigungen“.

.htaccess file permissions

Sie können die Datei schreibbar machen, indem Sie ihre Berechtigungen auf 666 ändern.

Geben Sie einfach „666“ in das Feld „Numerischer Wert“ ein und klicken Sie dann auf „OK“.

Change file attributes for the .htaccess file to 666

Dann müssen Sie die Schritte der ersten Methode unseres Tutorials wiederholen. Vergessen Sie danach nicht, die Berechtigungen wieder auf 660 zu ändern.

Sie können die Datei auch bearbeiten und ihr Code hinzufügen.

Edit .htaccess file

Nachdem Sie die .htaccess-Datei mit einem Texteditor geöffnet haben, fügen Sie einfach diesen Code ein:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Methode 4: Kontaktieren Sie Ihren Hosting-Anbieter

Wenn keine der oben genannten Lösungen das Problem der 404-Fehler bei WordPress-Beiträgen behoben hat, empfehlen wir Ihnen, sich an Ihren WordPress-Hosting-Anbieter zu wenden. Möglicherweise liegt ein Fehler auf dessen Seite vor, oder er kann Ihnen bei der Fehlerbehebung helfen.

Bitte lesen Sie auch unseren Leitfaden, wie Sie richtig nach WordPress-Support fragen und diesen auch erhalten.

Methode 5: WordPress-Beiträge mit 404-Fehler auf lokalen Servern reparieren

Wenn Sie einen lokalen Server zu Testzwecken verwenden, müssen Sie mod_rewrite in der Apache-Konfiguration Ihrer MAMP-, WAMP- oder XAMPP-Site aktivieren.

Dies ermöglicht WordPress, saubere URLs zu generieren und den 404-Fehler für Beiträge und Seiten auf Ihrem lokalen Server zu vermeiden.

Wie Sie dies tun, hängt von der von Ihnen verwendeten Plattform ab. Benutzer von XAMPP können ihr Kontrollpanel öffnen und unter „Aktionen“ auf die Schaltfläche „Konfig“ klicken. Wählen Sie dann „Apache (httpd.conf)“.

The Apache (httpd.conf) menu on XAMPP

Als Nächstes müssen Sie diese Zeile #LoadModule rewrite_module modules/mod_rewrite.so finden und das ‚#‘ entfernen, um sie zu entkommentieren.

Dadurch wird mod_rewrite geladen.

Finding the rewrite_module on httpd.conf file

Suchen Sie dann alle Instanzen von AllowOverride None und ändern Sie sie in AllowOverride All.

Der Wert „Alle“ bedeutet, dass alle Direktiven überschrieben werden können.

Changing AllowOverride None to AllowOverride All

Danach können Sie die Datei httpd.conf speichern und schließen. Danach klicken Sie im XAMPP-Kontrollfeld auf „Stop“ für das Apache-Modul und erneut auf „Start“, um es neu zu starten.

Gehen Sie dann zurück zu Ihrem Admin-Dashboard, um zu sehen, ob Ihre Permalinks funktionieren.

Wir hoffen, dass dieser Artikel Ihnen geholfen hat, die 404-Fehler in WordPress zu beheben. Vielleicht interessieren Sie sich auch für unseren Leitfaden zu den häufigsten WordPress-Fehlern und deren Behebung sowie für unsere Expertenauswahl der besten WordPress-Plugins zur Erweiterung Ihrer Website.

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

768 KommentareEine Antwort hinterlassen

  1. Syed Balkhi says

    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. Milan says

    Finding Solution on lots of Sites…. But No Luck And after all tried the following

    Settings » Permalinks, and simply click on Save Changes button.

    This Worked !!

    Million Thanks To Team WpBeginner….. !! :)

  3. Jeff says

    I’m afraid this did not work for me. I continue to get the 404 error and it affects all links from my front page. However, if I set the Permalinks settings to „Default“ everything works. I don’t want the default settings though – I want permalinks to use „Day and name.“ I’ve also checked the .htaccess file and that’s okay. I’ve done the same for permissions and they’re fine too. Help!

  4. Rick Harris says

    So this tip half works for me. I only have the 404 problem on 1 post, but it’s my first one so it’s the ‚what is this blog about and what you will find here‘ so its pretty important for the blog site.
    See if you can figure this out.
    If I set the permalinks to something like year/month/post name it works fine.
    Even if I go delete the htaccess file then make the change, setting it to ‚post name‘ results in that post getting the 404. It will still display on the home and category pages though.

  5. Annie says

    I went through both these options and I still am getting a 404 error. I have my permalinks set to ‚post name‘ but for some reason only ONE of my posts is stuck on a different permalink structure (the post ends with /3088 instead) and it doesn’t change when I update the permalinks. I also went into my .htaccess file, and it already had the code you had above in there, but there was nothing about permissions in the file. Is there anything I can do to make this post show up? I can see it in my homepage feed but get the error when I click on it to go to the post page.

  6. Emily Gates says

    Thanks admin i was so much worry about it actually i install category plugin(because i am running my blog that is facebookstatuss.com) and after deactivation i found my single post was not show properly 404 error was displayed but now i fix it. Thanks for giving solution.

  7. Somesh says

    I’ve changed my theme for a little bit. And it has for different section by-default in the dashboard.
    Gadgets
    Video Games
    How to
    So, after again re-applying the theme the posts at the post section are working fine. But, the posts for those section says page not found .
    How to bring those post back the post are available in the dashboard but, there thumbnails are also available on the website but when i click on that it says page not found.

  8. Edgar says

    Thanks for the info! Was in dispair, but now fine again. Had to do an extra step though. My host provider (hostnet) installed wordpress for me, so I had to get into their config panel to sync the .htacces file. Don’t know if this is more common for people using pre installed wordpress. Just letting you know ;)

  9. Carl says

    Hi,
    my problem was, that the .htaccess file was not writable.
    All I had to do was set the chmod to 777, then press the „save changes“ Button in the Permalinks-Options Menu. WP then properly flushed the old .htaccess settings and rewrote them.
    Works, Thank You!

    • Ben says

      Hi i had the same problem on 2 of my sites with editing the post or page ,everything else seemed to work fine. (hapened at the same time)
      I fixed it by changing the permisions in cpanel/file manager to 644 for files and 755 for directory’s setings and all was restored to normal agian. so check your hosting comp for their recomended setings on file permisions.

      Some how the permisions for all files and directory’s was set to 655 for ( all wp files and directory’s ).

      Changing the permisions on .htaccess file alone didn’t do it for me and editing it also didn’t solve it, nor changing the permalinks. {somehow i think my problem came from my server side.}

      Hope it is helpfull for someone.

  10. Pankaj Chauhan says

    I was getting the same 404 error on my blog. It was not happening with all the posts but with one specific post. After, few hours I noticed that the category name was causing the issue. so I deleted the category and recreated it with a different slug. It worked.

    but i am still not sure why it happened…

    Luckily, in that category, I had no posts otherwise…it would have been a problem as i had to reassign the new category to all the posts.

  11. Manisha Sarangi says

    Hello,
    I have got another solution and it worked like a magic.
    Just follow few steps here.
    For UBUNTU :

    1.You need to enable mod_rewrite in apache server
    sudo a2enmod rewrite

    2.You need to restart the webserver to apply the changes
    sudo service apache2 restart

    3.If you plan on using mod_rewrite in .htaccess files, you also need to enable the use of .htaccess files by changing AllowOverride None to AllowOverride FileInfo. For the default website, edit /etc/apache2/sites-available/default

    Options Indexes FollowSymLinks MultiViews
    # changed from None to FileInfo
    AllowOverride FileInfo
    Order allow,deny
    allow from all

    4.After such a change, you need to restart Apache again
    sudo service apache2 restart

    5.Then go to wordpress admin>settings>permalinks>select post name and save changes

    It will work now.
    Thanks

  12. David Vitorino says

    Thanks for this post!!

    I was trying to install wordpress in koding.com VPS and your post really helped me.

    the mod_rewrite was turned off in apache.

    Kudos

  13. Syl says

    Hey there !

    Thanks for your post. I have a similar issue on my wordpress blog and don’t know what to do right now. To make it short, my .htaccess file is getting overwritten over and over…

    These lines :

    # BEGIN WordPress

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

    # END WordPress

    are duplicated a hundred or thousand times with NUL characters, and my .htaccess is now 1.5 Mo ! I can fix the issue by uploading a clean .htaccess, but the issue occurs a few hours/days later, again and again, and the pages of my websites just show a 404 error…

    I also tried to put the htaccess file attributes to 404 instead of 604 to stop it from being rewritten, but my host doesn’t allow this and it came back to 604…

    WordPress : 3.6.1 Plugins : Akismet, Anti-spam, DB Cache Reloaded Fix, Do Follow, Google Analytics for WordPress, Post Ratings, Recipe Card, Tweet, Like, Google +1 and Share, UberMenu, WordPress Database Backup, WordPress SEO, WP Sitemap Page, WP Super Cache

    Any clue ?

    Best regards :)

    • WPBeginner Support says

      Deactivate all your plugins, if you have some custom code pasted in your theme’s functions.php file then create a back up of your existing file and then install a fresh copy of your theme. Delete your .htaccess file. Go to Settings » Permalinks and save your permalinks. Now connect to your site using FTP, wordpress would have created a new .htaccess file for you. Browse a few pages on your site’s front-end and then see if the changes in your .htaccess file reappear.

      Admin

      • MissyLee says

        Many many thanks for continuing with helping people – My child theme functions.php was the problem. Seriously, this is a great site! :)

  14. Megha Verma says

    Hi, I am facing problem of error 404 page not found. But it is not applicable on every post. This problem is coming 5 out of 10. Also I am using the same method creating all the post and the perma-link structure is /sample-post/. Kindly help me out from this and provide me the best solution.

  15. Biswajit Rout says

    Hi,

    Thanks for the information. I have the same problem.

    But now i fixed by adding the below code in my .htaccess.
    # BEGIN WordPress

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

    # END WordPress

    Thanks again for this post.

  16. Jyo says

    Hi, thanks for the info, but it doesnt work for me :( Please admin can you help me out. My permalinks arent working. I have tried your method. The only way its working is by setting permalinks to default else the whole site comes down, not even the wp admin section is accessible.

    • WPBeginner Support says

      Here is something you can try. Connect to your WordPress site using an FTP client like Filezilla. Once you are connected to your website, in Filezilla menu bar click on Server » Force showing hidden files. Find .htaccess file in your website’s root directory, download it to your computer, then delete the file from your server. Now go to WordPress admin area in your browser and click on Settings » Permalinks. Choose a permalink structure for your website and click save changes button. Hopefully this will resolve your issue.

      Admin

  17. Darren says

    Your are AWESOME! I had no idea what was wrong. 5 min of reading your post and a few clicks later my blog is up and running again! Thanks a TON!

  18. Gav Reichel says

    If all of the above isn’t making any difference for you, it might be worth asking your website administrator if they’ve added the following to the configuration (if using apache):

    Options Indexes Includes FollowSymLinks
    AllowOverride All

    (This is usually defined in the virtural host section)

    If not, your .htaccess file won’t be read!

    (I speak from experience after spending 30 minutes trying to work that out!)

  19. pete says

    Hi, got my htaccess hacked and had to delete it. Now I get this problem. This solution only get me halfways. From the browser 404 message(before) to my custom wordpress 404 page(after permalink reset). Any ideas?

      • Pete says

        Took me a while to get back…
        The htaccess look allright. It gets updated..Still not working. Only the custom ugly permalinks. Another wp site on the same server got hacked at the same time. But on that one this fix solves the problem..

  20. protik says

    Thank you Thank you so much…had a mild panic attack when the 404 error happened…this post was a life saver!!

  21. Peter says

    Thank you thank you thank you.

    It worked.

    You are right, there are so many variables that sometimes knowing what to ask is significantly more difficult that fixing the problem.

    I am now able to access my blog again.

    have a great day.
    Peter Sitting Scribe

  22. Allii Allee says

    i have done all the steps but its still giving me this error
    Error 404

    The page you’ve requested can not be displayed. It appears you’ve missed your intended destination, either through a bad or outdated link, or a typo in the page you were hoping to reach.

  23. Akhil Gupta says

    first of all i want to thank you for this great tutorial.. i am not able to change the permalink from the last 2 hrs.. i was changing the .htaccess file bit it was not working out but after seeing your 404 error post i was able to figure it out now my problem solved. Thanks once again

  24. Bruce Ketchum says

    Thank you, WPBeginner! Your tip on clicking the Save Changes button in the WordPress Permalinks settings fixed my 404 error, which was occurring on posts and pages.

  25. Adrian D'Amico says

    I too am having this problem on a site of mine – where it keeps happening every few days even after I hit Save Changes and refresh the Permalinks. I’m guessing it’s a plugin, but I havent gone down the list deactivating and reactivating them since I’d have to wait days to find out which one is doing it. Do you think that the htaccess edit solution you describe is a permanent solution, or will the problem resurface again? thanks for any help you could provide.

      • Adrian says

        Hello – I followed this tutorial but my site is still plagued by this problem. Is something triggering this to occur? Something like a plugin? I’ve double checked and my htaccess file always looks like what you suggest in the article, seems as if something else is going on at least in my case. thanks for any help you could provide.

        • Adrian says

          I guess what Im asking is do you know a way to track down what is causing it (ie. which plugin, etc.)

        • Rich says

          Do you have this in httpd.conf for webserver files – about line 220 in a default httpd.conf file. Could your host be overwriting changes you’ve made?

          AllowOverride FileInfo

          My webserver settings didn’t have this so despite changing this in the initial Directory settings it just wasn’t working. As soon as I did it worked.

  26. Jay Castillo says

    The question is, what is causing the problem with the htaccess file?

    I encountered this problem before and I traced it to using the diggdigg wordpress plugin.

    The quick fix was to save the permalink structure just like what you mentioned above, but the problem happened to me twice(404 errors on my blogposts, homepage was okay) in a week and after I removed the diggdigg plugin, it never occurred again.

    I still don’t know why it happened.

Eine Antwort hinterlassen

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.