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

Cómo corregir entradas de WordPress que devuelven el error 404 (paso a paso)

¿Sus entradas de WordPress devuelven un error 404 en su sitio web?

Este error se produce cuando puedes acceder al área de administrador y al blog de WordPress, pero cuando intentas abrir una entrada, verás el mensaje “404 No encontrado”.

En este artículo, le mostraremos cómo corregir las entradas de WordPress que devuelven errores 404.

How to fix WordPress posts returning 404 error

¿Por qué mis entradas de WordPress devuelven un error 404?

Hay varias razones por las que sus entradas de WordPress pueden estar mostrando un error 404 “Página no encontrada”. Estos pueden incluir:

  • Conflictos de plugins o temas: A veces, los plugins o temas que has instalado en tu sitio pueden interferir con la forma en que WordPress gestiona los permalinks. Esto puede provocar enlaces rotos y errores 404.
  • Problemas de código personalizado: Si has añadido código personalizado a tu sitio web, puede haber errores en el código que estén afectando a los permalinks o causando otros conflictos, dando lugar a errores 404 para tus entradas.
  • Problemas con su archivo .htaccess: El archivo .htaccess juega un papel importante en cómo WordPress estructura las URLs. Si este archivo está dañado o no existe, puede provocar errores 404 en las entradas.

Dicho esto, veamos cómo corregir las entradas de WordPress que devuelven errores 404. Puede utilizar los siguientes enlaces para ir directamente a las diferentes soluciones:

¿No quiere corregir los errores 404 usted mismo? ¡WPBeginner Pro Services puede ayudarte! Con nuestro asequible Soporte de Emergencia para WordPress, puedes contratar expertos para corregir errores 404, enlaces rotos, problemas de redireccionamiento y mucho más. Deje de estresarse por los problemas de WordPress y ¡consiga que se corrijan! Programe hoy mismo un servicio de soporte de emergencia para WordPress.

Tutorial en vídeo

Subscribe to WPBeginner

Si prefiere instrucciones escritas, siga leyendo.

Método 1: Comprobar si hay conflictos de plugins o temas y problemas de código personalizado

A veces, los plugins, temas o código personalizado que has añadido a tu sitio de WordPress pueden interferir con los enlaces permanentes o causar conflictos, dando lugar a errores 404. Incluso lo hemos experimentado nosotros mismos cuando probamos herramientas en nuestro sitio de demostración.

Una forma de resolver este problema es desactivar temporalmente los plugins. Los plugins a veces pueden alterar la forma en que WordPress gestiona los enlaces.

Una vez que hayas desactivado los plugins, puedes reactivarlos uno a uno mientras compruebas si el error 404 reaparece después de activar cada plugin. Si el error aparece después de activar un plugin específico, ese podría ser el culpable.

A continuación, puede buscar soluciones relacionadas con ese plugin o ponerse en contacto con el desarrollador del plugin para obtener ayuda.

Del mismo modo, su tema de WordPress podría estar causando el conflicto.

Para comprobarlo, puedes cambiar temporalmente a un tema predeterminado de WordPress como Twenty Twenty-Three o Twenty Twenty-Four. Solo tienes que ir a Apariencia Temas y hacer clic en “Activar” en un tema predeterminado.

Activating a default WordPress theme

Si el error 404 desaparece con el tema predeterminado, indica un posible conflicto con su tema actual. A continuación, puedes intentar solucionar el problema con el tema o considerar la posibilidad de utilizar un tema diferente.

Puede consultar nuestra selección de expertos de los temas de WordPress más populares para obtener recomendaciones.

Si ha insertado recientemente fragmentos de código en su sitio web, es posible que haya errores en el código que causen los errores 404. Examina detenidamente el código que has añadido y comprueba si puedes identificar algún error.

La forma más segura de añadir fragmentos de código a WordPress es con el plugin WPCode. Este plugin te permite insertar código personalizado sin trabajar directamente con los archivos del tema, lo que reduce el riesgo de romper tu sitio web.

Además, siempre que WPCode detecte un error en tu código, desactivará automáticamente el fragmento y te pedirá que lo compruebes. También puedes utilizar el modo de prueba para comprobar si tu código funciona antes de enviarlo a tu sitio web.

WPCode error warning

Si ninguna de estas soluciones funciona, pasa al siguiente método en el que solucionaremos los problemas de configuración de tu enlace permanente.

Las entradas de WordPress pueden devolver errores 404 debido a problemas con las reglas de reescritura en su archivo .htaccess. En la mayoría de los casos, puede corregir el problema actualizando sus ajustes de enlaces permanentes.

Simplemente vaya a Ajustes ” Enlaces permanentes en el administrador de WordPress y haga clic en el botón “Guardar cambios”.

Check Permalinks

No es necesario realizar cambios en los ajustes de los enlaces permanentes. Esto actualizará los ajustes de enlaces permanentes y eliminará las reglas de reescritura.

En la mayoría de los casos, esta solución corrige el error 404 de las entradas de WordPress. Sin embargo, si no le funciona, probablemente necesite actualizar su archivo .htaccess manualmente.

Método 3: Actualizar el archivo .htaccess de WordPress

Antes de empezar, asegúrese de hacer una copia de seguridad de su archivo .htaccess de WordPress. Si algo va mal, puede restaurar fácilmente el archivo original.

Ahora, tendrá que conectarse a su servidor utilizando un cliente FTP como FileZilla o la aplicación Administrador de Archivos en el escritorio de alojamiento de WordPress.

A continuación, tendrá que encontrar y editar el archivo .htaccess, que se encuentra en la misma ubicación que carpetas como /wp-content/ y /wp-includes/.

Basta con hacer clic con el botón derecho en el archivo y seleccionar “Permisos de archivo”.

.htaccess file permissions

Puede hacer que el archivo sea de escritura cambiando sus permisos a 666.

Basta con introducir “666” en la casilla “Valor numérico” y hacer clic en “Aceptar”.

Change file attributes for the .htaccess file to 666

A continuación, debe repetir los pasos del primer método de nuestro tutorial. Una vez hecho esto, no te olvides de cambiar los permisos de nuevo a 660.

También puede editar el archivo y añadirle código.

Edit .htaccess file

Una vez que haya abierto el archivo .htaccess con un editor de texto, simplemente inserte este código:

# 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

Método 4: Póngase en contacto con su proveedor de alojamiento

Si ninguna de las soluciones anteriores ha corregido el error 404 de las entradas de WordPress, le recomendamos que se ponga en contacto con su proveedor de alojamiento de WordPress. Es posible que haya un error por su parte o que puedan ayudarte a diagnosticar el problema.

Consulte también nuestra guía sobre cómo solicitar soporte de WordPress correctamente y obtenerlo.

Método 5: Corregir el error 404 de las entradas de WordPress en servidores locales

Si está utilizando un servidor local para realizar pruebas, deberá activar mod_rewrite en la configuración de Apache de su sitio MAMP, WAMP o XAMPP.

Esto permitirá a WordPress generar URLs limpias y evitar el error 404 para entradas y páginas en su servidor local.

La forma de hacerlo dependerá de la plataforma que utilices. Las personas que utilizan XAMPP pueden abrir su panel de control y hacer clic en el botón ‘Config’ dentro de Acciones. Luego, selecciona ‘Apache (httpd.conf)’.

The Apache (httpd.conf) menu on XAMPP

A continuación, tendrá que encontrar esta línea #LoadModule rewrite_module modules/mod_rewrite.so y quitar el ‘#’ para descomentarla.

Esto cargará el mod_rewrite.

Finding the rewrite_module on httpd.conf file

A continuación, busque todas las instancias de AllowOverride None y cámbielas a AllowOverride All.

El valor “Todas” significa que se pueden anular todas las directivas.

Changing AllowOverride None to AllowOverride All

Una vez hecho esto, puedes guardar el archivo httpd.conf y cerrarlo. Después, en el panel de control de XAMPP, haz clic en ‘Detener’ en el módulo Apache y en ‘Iniciar’ de nuevo para reiniciarlo.

A continuación, vuelva a su panel de administrador para ver si sus enlaces permanentes están trabajando.

Esperamos que este artículo te haya ayudado a resolver el problema de las entradas que devuelven errores 404 en WordPress. Puede que también quieras ver nuestra guía sobre los errores más comunes de WordPress y cómo corregirlos, junto con nuestras selecciones de expertos sobre los mejores plugins de WordPress para hacer crecer tu sitio.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Descargo: Nuestro contenido está apoyado por los lectores. Esto significa que si hace clic en algunos de nuestros enlaces, podemos ganar una comisión. Vea cómo se financia WPBeginner , por qué es importante, y cómo puede apoyarnos. Aquí está nuestro proceso editorial .

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.

El último kit de herramientas de WordPress

Obtenga acceso GRATUITO a nuestro kit de herramientas - una colección de productos y recursos relacionados con WordPress que todo profesional debería tener!

Reader Interactions

767 comentariosDeja una respuesta

  1. Abs

    It helps.. just on permalink, already fix my error..
    Thanks for this article..

  2. Julius

    Mine is a little different. All the pages are working fine but I get “page not found” when working in some places in the dashboard. Let’s say for example I’m creating a new page from the dashboard. When I click on publish I get a 404 error.
    And I’ve tried everything above but it’s not working.

  3. Iron65

    Thanks for the tip!! the permalink really saved me!!! In case if any other suffered this by updating Yoast SEO or by just deleting cache, try that one, it will fix it

  4. Monica

    I have been trying to fix this permalink issue in my site for months and now I did it with your instructions. I don’t know why I did everything you said already and after writing the 644 permissions to fix the httaccess file, it went back to non-writeable. Now I did it and fixed the permissions and wrote your code and it worked. i really don’t know which was the difference but this time it did. Maybe that I already fixed the httaccess in the original folder where I have a subfolder with my blog. That is the only thing I did differently. Thanks a lot

  5. Rais Dar

    I am getting a 404(page not found) on my site. What should i do as i tried your methods but still error persists

  6. Chetan

    I had faced the same kind of problem. I used to get 404 Page Not Found error for a page. But the reason was that I and used a permalink slug that was associated with some default page in WordPress. e.g. http://example.com/posts – This is WRONG. Because I cannot use ‘posts’ as permalink slug. It is already reserved for some WordPress page. When I changed it to ‘my-posts’, so that now my permalink read: http://example.com/my-posts, the error was gone!

  7. md

    hi ,
    i had same htaccess .,however , i delete it and import new one but still same .

  8. dumb

    hay guys ….
    when i change the permalink to anything other than default, my pages wont work i get this error message
    “The requested URL /wordpress/home/ was not found on this server.

    Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80”

    pl help me out

  9. Ian Scofield

    I just had this with one of my websites. All of my posts worked fine except for one though. Something was bad about the URL. I had to change the post URL.

  10. neelesh

    thanks a lot… ur website has helped me a lot of times and u guys are doing great job. i cant resist myself from thanking you…..

  11. Hardik

    Hi Wpbeginner,
    Actually I just have migrated from hostinger to one of paid hosting. After migration all things are going good. But when I have tried to edit one my post it regularly shows the following error.
    “Page not found error” ‘Apologies, but the page you requested could not be found. Perhaps searching will help.
    When I have landed here I have tried all the solutions which you have share.
    But nothing is working for me.
    Please Help.
    Thanks in advance
    Hardik

  12. Adrienne

    Question? I have an url site, but the data is all new. so there are about 100 old posts that are not longer valid but linked to other sites.. How do I change it to forward to main website, so that Google Search Console can update they crawl records.

    I’m looking, but I don’t see anything for posts that have been deleted and getting a 404 error.

    Thanks,

  13. David

    Thanks was having exactly that issue and this fixed it perfectly!

  14. Mark

    Thank you! So nice to find such an easy fix for such a frustrating mysterious problem.

  15. Xavier

    Woohoo! Thanks for this. I thought my site content had gone to the birds. Doing the permalink “Save Changes” worked instantly for me.

  16. Pablo

    What if it doesn’t work no matter what you do?

    HELP!

    • Fida

      Hi Pablo Which server do you use? Shared server or VPS?

  17. Steve Jackson

    Thank you for this tip, it was a lifesaver and worked perfectly!

  18. abhishek

    thank you very much it saved my links pretty well

  19. Hugo Nascimento

    Hello guys,

    I have the same issue with a client blog. i’m trying to build a custom form inside post page and when I enable the custom permalinks, the form cannot be accessed.

    When I change permalinks to default, it works out! :/

    Really strange. :/

    • Sarah

      Changing permalinks to default solved my problem too! Thank you!

  20. mojamalenkost

    Thank you so much!!!

  21. victor

    I have this problem .I can’t login to my WordPress dashboard, each time I try to it keeps giving me Error 404 not found. please help me fix this.

  22. Dont Ask Real Name

    Your tip was a life saver. All our posts were just not visible. Your tip helped a lot.

    What i did:

    Updated .htaccess set CHMOD to 666 instead of 660

    Clicked – > Settings -> Permalinks

    Clicked on Defaults and clicked Save Changes

    Again,

    Clicked on Post name and clicked on Save Changes. (since i used custom url that’s why)

    You just saved me a ton of headache…

  23. Clive Wales

    That was a real life-saver – thought I’d totally screwed up a replacement site I’ve been working on, after trying to be clever with an .htaccess redirection. Thank you!

  24. Marko Liuksiala

    Great, that worked – thank you!!

  25. Bill

    I like the permalink structure of my posts and they seem to work. I have been using the same structure for several years.
    However when I go to Settings–>Permalinks the actual structure is not even listed as one of the options available anymore.
    Is this a problem?

  26. Emily

    Hi I am having this problem and to be honest, I feel sick because I don’t know what to do. I am a novice really and scared I am going to kill my website more than I already have.
    Can someone please tell me what my custom permalink should look like and what I SHOULD hav in my .htaacess file? Right now it seems blank?

    • WPBeginner Support

      Go to Settings » Permalinks choose a permalink structure that you like and then save your changes. Open your .htaccess file and you will notice that WordPress has automatically updated it. If it is blank and your chosen permalink structure is not working, then you can manually add this code into your .htaccess file:

      # BEGIN WordPress

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

      # END WordPress

      Administrador

  27. Viktor

    Yes, that was the solution! Thanks a lot. My hosting service changed these settings as I changed the URL to custom error pages but just clicking on the permalink settings fixed that.

  28. Matthew Shelton

    “Go to Settings » Permalinks, and simply click on Save Changes button” – fantastic, that worked right away – thanks a lot!!

  29. Gretchen Louise

    What about for a single post permalink that got changed and somehow created an internal redirect, and now it cannot be changed back without creating a 404 error? Trying to troubleshoot an issue for a client and wondering where those internal redirects are stored and where in the world to clear them. Thank you.

  30. Thembi Ngema

    Dudessss. You guys are legends :)…. Must say I have learnt a lot from you in the past week :)

  31. bhupendra

    hi
    thanks I just updated parmalinks structure and site started working

  32. Arpee Lazaro

    i just updated t he permalink structures are pictured in this solution and it worked like a charm. thanks!

  33. Attiq Haroon

    I tried the solutions you mentioned in you post bhut it didn’t seems to be working. What happened actually is that I wanted to add a rule to .htaccess file so I downloaded that files from FTP and edited it and uploaded that file again replacing the original one, and then the problem popped up. I have tried a couple of fixes such as deleting and putting new .htacces with default code, removing .htacces file, etc. The only fix that is making the posts accessible is to set the permalink to default option. This makes the posts to work but it can not be a permanent Fix as it is not recommended as an SEO prespective
    Please try to find a working solution on that problem

    • WPBeginner Staff

      backup your .htaccess file. Then delete the one from your server. Now log into WordPress admin area and go to Settings -> Permalinks choose your desired permalink structure and hit save changes.

      After that connect to FTP and see if WordPress has created a new .htaccess file and it is not blank.

      • Attiq Haroon

        I tried that solution, It created a .htaccess file which looks fine but doesn’t work.

  34. gui

    If you have Yoast WordPress SEO or any SEO plugin installed, check your SEO permalink section…

  35. Tim Topham

    Hey guys – I recently received an email from Google crawl as I suddenly had a heap 500+ of lost links. It seems that at some stage I must have changed the permalink structure so that lots of the links on old posts have the post date and then post name where as they now just have the post name.

    Before I go mad trying to fix 500 links in my articles manually, is there an easy way to update the hyperlinks in articles when this sort of thing happens?

    Cheers,
    Tim.

  36. Cindy

    thank you! My sites were hacked and all internal pages showed a 404 error. saving the permalink settings fixed it! cheers!

  37. Joe Cutroni

    Hi all, I’ve scoured the web to find help to resolve my issue, but
    for the life of me cannot get anything to work. Starting just a couple
    of weeks ago, all of my back end pages (home page was fine) started
    turning out 404 errors on them.

    The permalink that I have always used is “Custom structure” (/%category%/%postname%/)…here are some things that I’ve tried:

    1 . Gone into my permalinks, clicked “save settings”, and that method provides a temporary fix, maybe for an hour or two, then the 404 errors return on all secondary pages. I’ve also set my permalinks to a different option, such as “Default”, but still get 404 errors shortly after.

    2. Completely deleted my htaccess.php file, then went back and saved permalink settings…less than an hour later, 404 errors returned.

    3. Commented out this line of code in my function.php file, also completely removed it altogether:

    “$wp_rewrite->flush_rules();”. That didn’t do anything. I’ve tried
    using both “//” and “#” before it and tested…still get 404 errors.

    4. De-activated all of my plugins to see it one of them was the culprit,
    but after a short time, my 404 errors resumed while none of the plugins were active.

    Like I said, this issue just start a few weeks ago. I use Securi
    Security and had them scan my site for any malware, etc…and the site
    is clean.

    Can someone PLEASE help me with this? Would bigtime appreciate it!

    • Kyle

      Hey Joe,

      Did you ever find a workable solution for this? I’ve gone through the same issues that you listed.

      • David

        Hey Guys!
        Did you find a solution to the returning 404-error as listed above by JOE CUTRONI?
        I’m dealing with the same issue?

        Some Feedback would be awesome!
        Thank you!

        Greetings from Germany,
        David

        • Paul

          Hey guys,

          you are likely to have a virus on your site.

          good luck
          Paul

  38. Katie

    This is the problem I am having. I moved from Wordpress.com to .org and I am at my wits end. I understand the directions that say got admin—> settings —> permalinks. In fact, I remember when I was setting this up that I messed with that particular setting. Here’s my issues: WHERE do I find this admin–> settings–> permalinks?? Is it on my host, in the cpanel? Is it back on WP.com, or if it’s WP.org? And if it’s on WP.org I don’t have a clue how to get to all the admin features of my blog now. When I log in, it shows me my personal profile and allows me to edit it. But not any blog administration. I am at a loss and really losing my head.

    • Gabriel

      If I’m understanding you correctly, just type in the domain name that you activated the wp.org tool and follow it up with “/wp-admin” (for instance “www.example.com/wp-admin”)log in and on the lower left hand side you would find the settings option.

    • mali suresh

      how can change localhost paramalink step by step help me

  39. Srihari K

    I had the same problem.. adding the below line in httpd.conf and restarting apache fixed it.

    Options +FollowSymLinks

  40. Kym Penrose Clayton

    Thank you thank you thank you :D

  41. Iris Fritschi-Cussens

    THANK YOU from the bottom of my heart! I had to delete my .htaccess file due to a hack and then just when I thought everything was fine again nothing worked apart from the home page. Pressing Save Changes on the permalinks solved it in one.

  42. disqus_Hct2NXneXJ

    Thanks Man. The Permalink Solution Fixed my Problem. Thanks & Cheers for You!

  43. L

    thanks! I was close to panic…

  44. Thai

    Thanks for the post! But sadly I tried these with on the local and nothing worked.. Any other tips?

  45. SemLavana

    Thank you. Saved my weekend! :-)

Deja tu comentario

Gracias por elegir dejar un comentario. Tenga en cuenta que todos los comentarios son moderados de acuerdo con nuestros política de comentarios, y su dirección de correo electrónico NO será publicada. Por favor, NO utilice palabras clave en el campo de nombre. Tengamos una conversación personal y significativa.