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)

Nota editorial: Ganamos una comisión de los enlaces de socios en WPBeginner. Las comisiones no afectan a las opiniones o evaluaciones de nuestros editores. Más información sobre Proceso editorial.

¿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:

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

768 comentariosDeja una respuesta

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

    Hi. Really nice article.

    I had a 500 internal server error issue with my site when I tried using the W3 Total Cache plugin.

    To fix this, I renamed the .htaccess file to .htaccessbak. After doing this, I noticed that the 500 error cleared but then I got a 404 error! All the links and pages on my site returned a 404.

    On the All Pages section, I see a link that says “Purge from cache”

    Please what do I do to clear this issue?

  3. Karma says

    I tried to follow your direction in fixing my problem, it took for about a day, but I didn’t find the good result.

    Then I gave up and contacted my hosting. And it fixed only in 5 minutes. Lol the problem came from the hosting…

  4. Mark Kay says

    By careful with post variables names. I had a contact form with an input field called “name”, that caused WordPress to show the 404 page. Took me a long time to figure out the problem. I fixed it be changing the field name from “name” to “your-name”.

  5. Ramzan says

    My problem is that I m going to wp adminin
    And want to edit post it is not going in edit mode of post and page gives me error page not found 404 but my site and its pages are opening well in browser
    Plz guide me I can solve this problem

  6. Sunit says

    Hi, I have tried following the above steps but my issue is this: when I visit my website directly by putting typing the url, then it works fine. But, when i type in my site url in google search box and then click on the link from the search results, I get the 404 error or message saying “your connection is not private”.
    My website is http://www.example.com but google search result shows it as https://example.com/

    So not sure what the issue is. I used to have wordpress.com but now I am dong self-host using HG.

    Any help will be appreciated.
    Thanks

  7. Michaela says

    hi, I tried first solution, nothing happened. I wanted to try the second, but I cannot find the .htaccess file. Not in FTP, not even in my WP online editor. I had this issue today for the first time. I use WPML plugin, until now everything went without problem, but today my translated post in English throws this 404 Error. Any idea what shall I do if I cannot locate the .htaccess file?
    Thanks!

  8. Shirish Dhungel says

    Well thanks! I remember, that WP Super Cache official stated to remove rewrite code from .htaccess. After that, my posts redirected to 404. Thanks to you, now my site is perfectly fine.

  9. Rohan khamkar says

    Sir, when I post a new post it gives me error that 404 page not found. Previously everything was fine but when I add a new user and give him a role of administrator from that time I can’t post new post. Any solution Please. Thank you in advance.

    • WPBeginner Support says

      You should never give administrator role to a user you don’t trust. You can always change back their role by going to Users page and then clicking on the Edit link below the user that you want to change. After that you check your site’s permalink structure. See if they installed any new plugin and if they did, then deactivate that plugin.

      Administrador

  10. R Donahoo says

    Didn’t work on my apache server. Had an additional step to allow mod_rewrite to actually work. Edit your httpd.conf file and add ‘Allowoverride all’. For example:

    DocumentRoot /var/www

    find the section that sets up the directory options, such as:

    Options Indexes FollowSymLinks MultiViews
    Order allow,deny
    allow from all

    add Allowoverride all

    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order allow,deny
    allow from all

    save and restart the web server to re-read the updated configuration.

    All was well after that.

    Thanks for your useful post moving me into the right direction.

  11. Eva says

    I found the some problem. However, I could not log in to the admin page. Could you give solution to mitigate this problem?

  12. Rachit Sharma says

    but not working for me when i updated permalink with post name and change .htcces file but not worked. any other solution for that.

  13. Ahsan says

    Wowww Thank you so much, that was really helpful.
    In my case it was WAMP server, after turning on “rewrite module” in apache, my problem was solved.
    Thanks.

  14. Kailash says

    Wow – this still works. Done a search on google and found articles in wordpress but this was by far the simple-est and bang it works.

    Thanks a mill – saved me a heap of time

  15. Shawn Ritch says

    Hello and thanks for all the useful tips. Unfortunately, this tip didn’t work for me. I re-saved my permalinks in WordPress settings (didn’t work) so then I tried your next method and it didn’t work either. I’m thinking the reason for this is because I have different permissions. My original permission is 644. When I change permission to 660 none of my pages work so I believe the 666 permission is wrong as well. I’m using a Go Daddy server if that helps any :/

    I’m at a loss and have no idea what to do from here. However, I can’t afford to have pages that don’t work. Any suggestions would be greatly appreciated.

    Thanks
    Shawn Ritch

  16. Ronn Reason says

    hi
    i keep getting this message with my email account;

    Error Oops… a server error occurred and your email was not saved. (#404)

    Please advise ASAP

  17. Steve says

    I had this problem after moving sites to a new server. Default Permalinks worked, but not the settings I was using.

    I needed the apache server to “Allow Override” for the htaccess file to take effect.

  18. Vivek says

    Hi,

    I need a little help regarding 404 error.

    I am getting 404 error in my Page 2 section.

    I have googled a couple of times. but did not get the solution.

    Could you please tell me what is the reason for it?

  19. Rudy says

    My site links will work ONLY after I’ve VIEWED the permalink settings, without any changes, and Voila! The links work again. What is causing this and how can I program this instead of having to log in?

    I’ve tried the following commands in WP-CLI to no avail:

    wp rewrite flush –hard –path=c:\xampp\htdocs\mywordpress

    wp cache flush –path=c:\xampp\htdocs\mywordpress

  20. Amanda says

    Hi there,

    About an hour ago I was able to remedy a pesky ‘500 Internal Service Error’ by following your sage advice and renaming the .htaccess file to .htaccess_old. I was immediately able to access my wp-admin area–and I thought–get going again.

    Unfortunately, something happened which rendered all of my other pages unfindable; each kicking a 404 error.

    I attempted the steps you provided above, but to no avail. Might you have any further suggestions?

    Thank you.

  21. mehdi says

    why i coudl not see my post?
    after I send a post my preveous posts appear.
    it made me crazy please remove previous post

    I found a solution to my problem and will say in next post

  22. mehdi says

    Hello agin
    thank you for this useful article/ I found a bug in wordpress in rtl language in displaying permalink
    I read your article and encourage to solve the problem with your contribute.
    ——————————————
    my problem in detail:
    1-I created a mysql database(in utf8 general ci)
    2-I installed last wordpress versin(locally) and install my theme(multiup v 1.2 from themeforst)
    3-Next I did import demo as whele.
    in the theme admin panel exixst category portfolio (in this section we create our category with name and slug) then in all post under portfolio section we can create our posts and determine category of post from portfolio category) finally in homepage we have a section that shows portfolio post in category(with their picture)
    In english slug and name the category of portfolio show well but when i change category in portfolio category( slug) into rtl language the category in homepage canvert into charachter like base 64(I think that my slug convert into ansi ie each character convert into 6 charachter)
    How I can overcome my problem?I think I must avoid change slug or show slug into utf8 or unicode . I am beginer in wpordpress , If I khnew wordpress more I could solve this simple problem .Any one with khnowledge of handling hoock and filter and plugin and wordpress can solve this permalink problem . I sure I will solve this problem with your help.
    ———————————-
    I tried the second way you offer (that phpmyadmin in utf8generalci) but it doee not work for me.
    before thansk a lot for helping me.I followed your posts regularly .
    ……………………………….
    1- first I did the trick in above article (this is so good but didnot solve my problem)
    2-

  23. mehdi says

    hello
    thanks to contribute you knowledge to others .my english is not well.excuse me.
    I download a wordpress theme with portfolio link in admin panel that in porftoli section we can define some category with name and slug . in post we can determine category from portfolio.
    in homepage we can display post in portfolio category! all thing is ok but wen i chang name and slug into rtl language the title of a group in home page shows like this %d8%a8%d8%b1%d9%86%d8%af%d8%b3%d8%a7%d8%b2%db%8c
    i did your solution in this topic and that another topic(How To Enable Custom Permalinks) but not woks for my problem!

    • WPBeginner Support says

      This could happen if your WordPress database is not using UTF-8 character encoding. Please make sure that your database is using utf8_general_ci as collation. You can check that using phpMyAdmin from cpanel. Before you make any changes to your database, please create a complete WordPress backup first.

      Administrador

  24. Atula Gupta says

    Thank you so much for fixing my problem in seconds! I was panicking about all my posts giving this error and this solution was so simple! Thanks again.

Responder a Max Legault Cancelar respuesta

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.