¿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.
¿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
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.
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.
Si ninguna de estas soluciones funciona, pasa al siguiente método en el que solucionaremos los problemas de configuración de tu enlace permanente.
Método 2: Corregir la configuración de Permalink
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”.
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”.
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”.
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.
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)’.
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.
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.
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.
Thomas Elkin II
Unfortunately, this has not helped me. Neither solution has worked. Anyone have another suggestion(s)?
Sharma Rahul
Gotta, thanks man !! saved my evening (y)
Javier Rodriguez
Waooo. one week trying to find what was wrong and it was the WAMP problem. fix it with one click. thanks a lot
Ben
Thank you. Clear advice which saved me many hours of panic.
Milan
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….. !!
minacio
Great help, thank you very much!
So easy!
Jeff
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!
WPBeginner Support
Jeff did you try deleting your .htaccess file? After deleting it you need to go to Settings » Permalinks and save your desired permalinks settings.
Administrador
Rick Harris
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.
Alejandro
Thanks!!! …fixing the Permalinks did it for me! (;
Gaston
Ha ha, so easy! thanks!
Indonesian
really helpful.. thank a lot… You’re rock man.. !!
Annie
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.
Ashleigh
I’m having this same issue… HELP
Scotty
yessss. thanks for this post – really saved my bacon!
Roel
You’re a boss.
Emily Gates
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.
Marx
Dude, you’re the man.
Amon Lucas
Thanks ! Obrigado .
Somesh
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.
sven
thank you so much. you made my day.
Naser
Thanks a lot. You made my day. Thanks……
Edgar
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
Markus Dan
This is genius!
Thanks … you saved my day!
Dani
Ey man, thank you very much. You saved me a lot of hours of work!
Carl
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
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.
Pankaj Chauhan
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.
JP van der Meer
Thanks a lot, it helped me!
I did delete the .htaccess
Thanks!
Manisha Sarangi
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
David Vitorino
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
seb okelly
This post fixed my problem, which I had made worst fumbling around the Codex. Thank you.
Syl
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
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.
Administrador
MissyLee
Many many thanks for continuing with helping people – My child theme functions.php was the problem. Seriously, this is a great site!
Megha Verma
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.
Ana Villegas
Awesome! This help me a lot, thank youuuuu! <3
Biswajit Rout
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.
Jyo
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
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.
Administrador
Elizabeth
This 404 error was driving me mad!. Thanks for this instructive information!
Decio Denis Bernardo
Thank you.. nice and easy!
karen
I thought I already messed up with my blog and can’t make it work again. Thanks for this nice post!
Darren
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!
Gav Reichel
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!)
pete
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?
Editorial Staff
Can you see that the .htaccess is being created? If not, then you may want to add a blank .htaccess file.
Administrador
Pete
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..
protik
Thank you Thank you so much…had a mild panic attack when the 404 error happened…this post was a life saver!!
Rod Salm
Permalink fix worked for me, thank you very much!
Rod Salm
Peter
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
Allii Allee
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.
Akhil Gupta
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
SBC
Thanks, it really help me to sort out the problems with my site…
Bruce Ketchum
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.
Imran Hossain
This is a vary important tutorial for me. Today i learned 404 Not found error.
Adrian D'Amico
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.
Editorial Staff
Every WordPress site using custom permalinks have that code.
Administrador
Adrian
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
I guess what Im asking is do you know a way to track down what is causing it (ie. which plugin, etc.)
Rich
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.
Jay Castillo
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.