¿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.
Laxmi Prasanna
thank you very much. you saved my day. god bless you
chandan
you save my day
Alessandro Morotti
Thxs a lot man.
Your save my job!!!
congratulations by your time
Niketa
Many many Thanks.. I was worried first but your blog fixed my 404…as I was having exactly same issue.
Abhishek Sharma
Sir i dont know how to thank you.. But today you saved my life.. I was so scared. I just published a post and then when i checked that in my browser it showed 404 error then i check another post and then all . i was surrounded by 404 errors except my homepage was working. Now before posting to wordpress forums i just googled it and found solution on your website.,..
Mannn Thanks for saving my life.
WPBeginner Support
Hi Abhishek,
We are glad you found this article helpful. Don’t forget to follow us on Facebook for more WordPress tips and tutorials.
Administrador
Richard
Hi !
I doesn’t work for me.
i added ” . ” for prefix category but i fall in a 404 page when i try to access to my subcategory :s
CR
Awesome! It helped.
Paola
I LOVE YOU! I didn’t knew how to fix this I’m a complete novice. Thank you thank you! !
Marlena
I’m so pleased to have found this article first. I’m a complete novice and I fixed my own 404 issue.
YAY!
Thanks so much!
Saud Razzak
Very informative and useful article for WordPress beginners!
Eri
Please can you help me for this, because I tryied but i cant fix it :/
Tom C
Great guide! Totally solved my issue.
Anil
I have created a subdirectory. And I have two wordpress installed, one in root and the other in subdirectory. Both of them contains posts and pages. I want to access both and it’s happening. But when I am hiding the subdirectory slug from the post URL by modifying the .htaccess file, the sub directory name got hidden as per the requirement but the posts of my main domain is inaccessible and getting 404 error. I want to access the post from both root as well as subdirectory. Please suggest.
Jawad
Thank you very very much for your help
Farukh Hussain
Thanks alot for sharing. Your tutorials always helps me.
Karen
Thank you so much for this!
Grant Turner
Fixed. My problem was since I’m running on a windows server then I don’t have a .htaccess file. I need to create a web.config file.
Cindy Martin
This fix DID NOT work for me! I still have a 404 error on my blog page only. I am using Gridalicious and have had nothing but trouble! (Not with Gridalicious but other stuff too).
I removed everything from the to start over. loaded the theme and get the error.
Blog posts are not showing up on the blog page except in the widget and the main page is the 404 error message. Saving permalinks does nothing at all. Host is GoDaddy. HELP! I’m really tired of all this and frustrated.
WPBeginner Support
Hey Cindy,
This seems like an issue with your WordPress theme. Please follow the step by step instructions in our WordPress troubleshooting guide. It will help you figure out what’s causing the issue.
Administrador
Maranna
Thanks! I moved website from one server to another and had the problem with posts returning 404. Main page and admin were working fine. Re-saving permalinks worked to fix this problem. Seems that this setting is not carried over correctly in all cases.
Aondongu Tivzenda
The permalinks fix worked perfectly. Thank you for this website. Awesome!
alvin
My problem is funny. I have a couple of WP websites I am currently running each logged into one browser with different portals and logging user names. After I noticed the 404 error checking the redirect area i see my author names have been mixed up from all the different websites. Can someone please assist
niranjan
It worked! Thanks!!
Vishwa
It worked! Thanks!!
Yours is a great website!
Charley Gordon
Thanks for sharing your knowledge.
Al
Thanks, worked for me
Mayapur Voice
This post saved my day today! In an attempt to fix a long standing problem today our host changed the .htaccess file. The issue got resolved but it broke all my links. By the grace of God, I found this post in an instant and it was exactly what I needed. Thanks tons!
marcela bonadio
exactly what i needed. thanks for sharing your knowledge.
Casey
Hello, thanks for this article and all the other awesome articles I have found on wpbeginner. I am running into some problems with my front page giving me an “oops! That page can’t be found” error. I am wondering if you have any advice on how to fix it.
I am running:
LAMP with Debian 3.2.84-1 x86_64 (Wheezy) on a VPS, Apache 2.2.22, php5
Wordpress: 4.7.1
Theme: YS Magazine
The original issue occurred when I switched the permalink structure to use “post type” instead of the default. At that point I could no longer view any of my pages and just got a 404 error. So, I did some research and edited my .htaccess file to allow overwrite. This fixed the problem of the 404 errors on all my pages, except on whatever page is set to my home page. To be clear, there was no problem with any of the pages before I changed permalinks. It also does not matter if I set the front page to static or posts. If I change my front page to another page I can then see the page which was set previously as the front page, but the new front page then gives me the error.
I have tried:
disabling all my plugins and enabling them one by one
changing themes
changing the .htaccess file back
changing permalink settings
I have been searching for an answer to this for hours now and seem to have ran into a brick wall. Any help would be super appreciated. Thank you so much.
Bart Dority
Thank you so much for this post!
I knew my 404 errors had something to do with the permalink structure – and I even tried changing the permalink structure and saving it – and otherwise updating and refreshing it — but it still wasn’t working. But then I read this post which said — instead of changing the permalink style and saving it, — just leave it where it is, and click Save anyway. That worked for me. A huge relief. Thank you!
Angelica
Thank you so much!! It worked!!
MarcB
Thank you so much for this help. Really a lifesaver.
Elyes Gherib
Thank you very much, this did it for me!
Z
Thanks for the post. I’ve had to deal with other problems after switching hosting providers, but this was a new one.
I did the method provided and my site was back to normal within seconds.
Kristine
Hello, I am hoping you can help me- I am super nervous about my wp site right now. When I type the address into the search engine it is a completely barebones site that says it is “set up through Wix” that no longer looks like our site we have been operating through wordpress. This just happened out of the blue and I am so nervous about our posts.
WPBeginner Support
Hi Kristine,
It seems like your WordPress site’s domain is hosted by Wix. If you have login details for a wix account, then you can login and point the domain to your current WordPress hosting provider. If you are unsure, then please try contacting Wix support and your WordPress hosting provider support for more help.
Administrador
Jolene
Thank you! My blog has been down and I couldn’t figure out how to fix. In a last ditch effort before I call customer support…I googled. You saved the day!
Bruno Almond
Great blog here! Additionally your site rather a lot up very fast! What host are you the usage of? Can I am getting your affiliate link in your host? I desire my web site loaded up as fast as yours lol
WPBeginner Support
Hi Bruno,
WPBeginner is hosted on a HostGator dedicated server.
Administrador
AJ
great job mate, you did a better job than the tech support at bluehost
Lorene
No, this worked for the one post that was showing Error 404, but then ALL the others that worked before, now show Error 404. So I had to change it back. Hope most of them work now.
Gabe DeFrates
Excellent tip for fixing the permalink! I was getting the “File not found” error, and I went right into the WP Control Panel Settings, Saved Changes and she’s working again. You saved the day! Thank you for your time in posting this.
Samnang Thorng
Thanks I can deal with site now. Great helps
jhonny
Recently I have changed my site permalinks and now i am getting lots of 404 errors i have redirected them some of them to new url and others to homepage but still my site users were going down and down what to do now help me please should i change them back to old permalinks? or something else to do please tell me
Exxagon
Thanks a lot for your post.
Since many weeks, I was stucked with a 404 error each time I tried to change my permalinks structure.
I found the solutions in your post :
1. Modify /etc/apache2/apache2.conf, and set “AllowOverride All” everywhere instead of ” AllowOverride None”
2. Empty /var/www/html/.htaccess completely, change it to www-data:www-data & set it temporary to 777.
3. And the main one : “sudo a2enmod rewrite”, and “service apache2 restart”
Thanks again !!
Xavier
Asif
thanks bro it help me and my server version is working fine now
Suraj
Thanks a lot… It’s working for me.
Erwin
Hey, where can I find “/etc/apache2/apache2.conf”??? I don´t even know where to search? Do I need a special Application or something? Sorry, i´ve no idea : I
Abel
Hi, “/etc/apache2/apache2.conf” is a Ubuntu system folder. If you want to access it, you should have access to your server (like ssh).
Abel
Thanks a lot!
Vinita
Recently I am getting lots of 404 page errors in google webmaster. While revamping my wordpress website, instead of redirecting old urls to new, I just edited existing urls to new ones. e.g. website.com/url1 was edited to website.com/url2. Now webmaster if giving 404 error for old urls i.e. website.com/url1. How am I supposed to solve this error? (there are almost 155 urls with 404 errors so cant ignore)
WPBeginner Support
See our guide on how to setup redirects in WordPress.
Administrador
Sandy
Is there a plugin that can find 404 errors and redirect them safely with best SEO tactics? Or should i do a edit find and replace in my xml file and remove the urls?
appreciate your ideas…
Michael
changing the right to 660 made my site unavailable. i had to set .htaccess to 644 (which was the original setting). regards Michael
Swadesh
Thanks a lot
Its working for me.
Kieron Atkinson
I’m running wordpress on a client’s in-house server and even though the htaccess file is there with the rewrite module sequence, permalinks are still not working. In fact all the URLs are coming up as example.com/index.php/permalink.
How do I check if the module rewrite is enabled on the server? My client says that they have that enabled but it still doesn’t work.
Many thanks for your help.
Kieron
Renee
Mahalo nui loa (thank you very much)!
Reassigning the Permalinks is exactly what was needed after moving 10 sites to a new hosting company.
Abundant blessings to you and your team.
WPBeginner Support
Hi Renee,
Glad you found it helpful and thanks for the kind words. You may also want to join us on Twitter for more WordPress tips and tutorials.
Administrador
Steve
Thank you for your well written article. I have logged in to both /wp-content and /wp-includes/ and I havent found my .htaccess file.
Is it possible that I dont have one as I also get the 404 error if i try and redirect a page usin Redirection in WP.
Thanks in advance.
Steve
WPBeginner Support
Please see our guide on why you can’t find .htaccess file on your WordPress site.
Administrador
Paras
hello
i am facing this same problem
i tried your method but still its showing error
Margarita
Today I was about to launch my web after 5 months working very hard in localhost. I was very happy but exhausted. While doing all the migration process, my site was gone. I had made a backup of course, but after trying a hundred times nothing worked. All seemed lost… until I found your post and it was solved in less than 30 min.
My day has been awful, a waste of many hours and energies. But now I go to bed with a smile in my face. Happy again. Infinite thanks.
Marga Rubio Soto
WPBeginner Support
You are welcome. We are glad you found the article helpful. Don’t forget to join us on Twitter for more WordPress tips and tutorials.
Administrador