How to Fix the WordPress 404 Error

How to Fix the WordPress 404 Error

By  |  January 10, 2020  |  Search Engine Optimization, Web Design and Development  |  Comment

How to Fix the WordPress 404 Error

How to Fix the WordPress 404 Error – A permalink is a permanent url to your posts, categories, archive and other similar pages. It’s the unique link that directs to a specific, corresponding post. Apretty permalink is a more detailed url than the default option. Instead of displaying only the id number of your post and not much else, pretty permalinks can also include the year, month and day your post was written as well as the post title and other similar options. When you install wordpress, you’re automatically set up to use pretty permalinks, though, you need to choose what you want to be displayed in them. If the apache mod_rewrite extension gets disabled or there are plugin and theme conflicts, these types of links stop working. Resetting your pretty permalink settings should fix this issue with mod_rewrite if uploading images causes the white screen of death or if your posts or pages are returning a 404 error. Doing this flushes the current rewrite rules and you can try to do this automatically or manually. If your custom post types are the subject of the 404 error, then look to the next section for the solution.

404 errors are not good for user experience. We showed you how to get email alerts for 404 errors on your site so that you can quickly fix them. In this article, we will show you how to improve your 404 page template in wordpress, so you can create a more useful 404 page that actually help users.

If you’re experiencing sitewide 404 errors when trying to access content, the most likely cause is an issue with your permalinks (or your. Htaccess file , if your host uses apache ). If you’re a kinsta client, we utilize nginx , so you can rule out the. Htaccess file as a possible cause. The easiest way to fix this is to update your permalink settings through the wordpress dashboard. All you need to do is go to settings → permalinks and click save changes (you don’t need to make any changes – clicking save changes is enough). Regenerate permalinks in wordpress.

Unfortunately, 404 errors will happen on your site whether you like it or not. The larger your wordpress site is, the more you’ll start seeing. We recommend getting a good workflow together for how you monitor these types of errors and go about fixing them. 404 errors are never good for visitors, your brand, and google doesn’t like to see them either. Have any other tips or questions regarding the error 404 not found message or how it impacts your wordpress site? let us know below in the comments.

This is one of the many benefits of using wordpress. The platform offers you many ways to leverage things like 404 errors and fixing broken links to your advantage. Hopefully, you’ll be able to use this guide to make the most of your website traffic and generate many extra sales.

Beware that some rss readers may try to load a favicon file/image (favicon. Ico) the little square 16px x 16px image you will see if you bookmark a page. If this doesn’t exist, it will also create a 404 page. Since wordpress 4. 3these favicons can be added from the wordpress dashboard. So no excuse not to have one! apple devices do a similar thing as rss readers, searching for files that might not actually exist. You could see lots of 404 errors in your logs for the following files, apple-touch-icon. Png and apple-touch-icon-precomposed. Png. Again the easiest way to handle these 404 errors is to create these files and place them in your wordpress root directory. You can find more information about these files on the ios developers website i’ve tried to cover most things in this guide, hopefully the above will help you fix any 404 errors on your wordpress site. Was this article helpful to you? 1 last modified: 14/08/2019.

In this tutorial we will explain what the wordpress 404 error means and how to fix it. There are different types of errors that you may encounter when working with wordpress blog. One of the most frequent of all is the ‘404 not found’ error. It happens after activating a new theme or rewriting the rules in the. Htaccess file. This error is mostly prompted when you navigate from home page to other pages of your website. Given below are two options you can use to fix this issue:.

Create a custom 404 error page

The theme in use for your website can have a 404-error template file. To find it, login to your wordpress admin dashboard. In the left-hand menu, go to appearance -> theme editor. On the right side of the screen, you should find a 404 template (404. Php file) you have to customize as you want. Important note! for some themes, there’s no 404. Php file available in theme editor. That doesn’t need to upset you, because there’s a better solution to customize your 404-error page. Keep reading on. To start the process of customizing a 404-error page, you also need to be aware of its usefulness for the readers. You need to be fully aware of its importance in that: a customized 404 error-page is user-friendly, and it encourages navigation within the rest of the website, increasing time on site (when there’s a risk for users to leave the website) custom 404 pages serve to increase branding. As long as they borrow the color scheme of the website, and the layout integrates well in the overall website presentation, typography is in line with that of other pages, customized 404 pages have their contribution to the brand personality in the online medium. A404-page acts like a soft-sell landing page: it helps retain people on the website and it can serve to better clarify the decision-making process for users that’ll relaunch their search.

Login to your wordpress admin dashboard. In the left-hand menu, go to plugins -> add new. In the search bar placed on the right side of the dashboard, type in 404page (the name of the plugin). Click install, then activate plugin. Next, create a page that’ll be representative as your 404 page in the website. Note that, for this doing, you have to go to pages -> add new -> create your own page. The new page can be customized like any other page in the website, either in the wordpress editor, or directly in the customizer (as is the case for the mesmerize theme). How you can customize a 404-error page: you can add a specific title that explains that this is a 404 page. You can add 1 or 2 blocks of content, if needed, for further indications or to embellish the page. You can customize the background of the page, so it perfectly integrates into the overall website design and, implicitly, its branding. Elements to consider as potentially helpful in a 404-error page: a search box – it might help users directly search for the information they need, right in the error page a link to the homepage – this is useful for orienting visitors in the navigation process, in case they landed on an error page a funny message – the text in a 404-error page might be friendly, so users be inclined to dwell longer on the website and relaunch their search for the needed information; such a message sets up a connection with users an explanatory message for the 404-error page display – if not funny, at least clear and explanatory, the text in the error page should help users. This text is bound to tell users why the error page is displayed at this step of their search process, and how to restart their browsing session additional links to where users can restart their browsing session – in line with the above text element, links that help users navigate through important pages with useful information are more than welcome in 404-error pages the main menu – as we’ve mentioned useful links, the main menu cannot miss from the list. It includes the most important links for visitors to follow, so consider including the menu in the 404-error page, as well. Some clues as to how users can get oriented into the website – this element is more generic, but we thought it might be useful to include it on the list, as incorporates several distinct elements (at your choice) that are aimed at orienting users within the website, and out of the error page. You can choose to display popular posts, so visitors of the blog can restart their navigation from a widely appreciated post of yours you can choose to display most commented posts, so users will restart their navigation within the blog from some posts presenting topics of high interest you can choose to insert an archives widget into the error page, so visitors can browse through older posts, in search of topics they are interested in. After the page you want to use as your 404 page is ready and customized, you have on more step to follow: in the left-hand menu of the wordpress admin dashboard, go to appearance -> 404 error page. Select the page you have just customized as your 404 page and set it as 404-error page that’ll be displayed by default, when users land on a broken link: click save changes and that’s it. You have finished setting up a customized 404-error page for your website or blog. Now, re-enter your website address into the browser, and type just anything after the address/justanything. Here’s how the page might look like: this is an example of 404-error page that we’ve customized with the 404page plugin, for the mesmerize theme. Note that you have complete freedom as to how you can customize your page (as it is created as just another page of your website). The above example is a simple suggestion, as we wanted to show you 404-error pages can look greater than the default 404 pages appearing when website owners haven’t customized it at all.

By reading this quick tutorial, you can now hopefully create a custom 404 page complete with a custom user-friendly message. You can also configure the. Htcaccess file to ensure that your website visitors are always redirected to the right 404 page by the server in situations when wordpress is not able to or when you change themes. If you want to attract loyal visitors that will always come back to your website, it’s important to customize your 404 page with a less irritating message. And of course, trying to limit the number of times a visitor even lands on a 404 page is a good idea, too. Do you have any great ideas for a custom 404 message? what are you currently using on your 404 page? i’d love to hear your ideas in the comments below!.

Create your custom 404 error page just like any other page using the wordpress page editor. Then go to ‘appearance’ -> ‘404 error page’ and select the created page as your custom 404 error page. That’s it!.

When a visitor requests a file or page that doesn’t exist, wordpress displays a 404 not found page that can include, widgets, archived pages, links, a search form etc. Now these custom 404 error pages might look good and have some useful things on them, but when loaded it creates unnecessary php & mysql queries using server resources it doesn’t really need to.

We now need to create a simple html page for the 404 error. This can be added in the hosting control panel, or via the. Htaccess file.

Since you all run different websites, we made sure that the free 404 error page templates we bring to the table are of as different styles as possible. No doubt, you will find one that meets your expectation without hassle. Even if you are a choosy user, there is something for every taste. On top of that, the web designs are customizable to fine-tune them further. In addition to that, all are responsive, seamlessly readjusting to mobile, tablet and desktop devices. They work fantastically on retina screens and an assortment of different web browsers, too! keep every section of your website at a professional level. More info / download demo.

The 404page plugin was sucessfully tested by the author with the following themes

However if there are still broken links and you are sure that the post and page exists, you can troubleshoot the problem by following these two steps: temporarily activate one of the default wordpress themes. If the links work when you switch the theme , there is a problem with your old theme. Contact the theme author for help. Deactivate your plugins one by one to see if there are any improvements. We do this test because a plugin may be interfering with the permalinks.

Login to your wordpress admin dashboard and navigate to appearance -> editor. This will launch the edit themes screen. To the right, you should be able to see a list of all templates in your theme. Look for the 404 template (404. Php). If you’re using a child theme, which you should, you will need to create a new 404. Php, populate it with the contents of 404. Php from your parent theme, and then store it in your child theme folder. This is as simple as just copying the 404 file to your child theme. Note: unless you use a child theme, you will lose your custom wordpress 404 page next time you update your parent theme. We will talk about child themes at a later date, so be on the lookout for that 🙂 back to creating the best wordpress 404 page. This is the 404. Php from my theme: 404 and here is how it looks before custom changes: pretty dull, huh? we will make it look great and a bit useful in a few minutes. First of all, i will create a new 404. Php file for my child theme. This is as simple as copying 404. Php template from the parent theme to my child theme. This you do by logging into your cpanel -> file manager -> public_html (or www): then just navigate to wp-content -> themes -> your theme. From here, just copy 404. Php from the parent theme to the child theme. Simple as a, b , c. That done, it’s time for the fun part. Refresh the edit theme screen or go to appearance -> editor and your child theme should show the new 404 template: note, i’ve already made changes to the 404. Php in this screenshot. Notice the new 404 template, to the right. Load 404. Php and get ready to customize it to your liking. First, let us change the wording to something a bit personal. Just edit the content between … or … tags. You can add your own headings and paragraphs as you wish. Iadded a heading (see something broke ) and modified the paragraph. Here’s the modified code: oh snap something just broke. Iknow it sucks, and you are not to blame. Please use the search box or the links below it:’, ‘wpex’ ); ?> now let us add a search form below our new message above. Add… …where you need your search box to appear. Iadded mine just below the paragraph like so: oh snap something just broke. Iknow it sucks, and you are not to blame. Please use the search box or the links below it:’, ‘wpex’ ); ?> the result: below the search form, i will add links to the home page, contact and hire pages. Go back to your code and add the following: home contact me hire me replace yoursite. Com with your own domain name. Ihave added some css styling too. Iadded this css code to your style. Css file. You can change it as you deem fit. Just go to appearance -> editor, and add:. Error-page-nav {margin-top:10px;}. Error-page-nav li {display:inline; padding:3px; font-weight:bold; font-size:1em; text-decoration:underline;}. Error-page-nav li:hover {text-decoration:none; } save all changes and refresh your 404 page to see how it looks. Note, if you have ithemes security, the plugin will lock you out if you reload the 404 page many times, so deactivate the plugin first. Let’s make our custom wordpress 404 page richer. We will display most popular posts, most commented posts, and recent posts. We will use one of the best wordpress popular posts plugins known as wordpress popular posts. First install and activate wordpress popular posts. Then add the following code to your 404. Php file where you want to display your popular posts: or check out popular content on my blog: popular posts most commented recent posts ‘postbypost’, ‘limit’ => 10, ‘format’ => ‘custom’, ‘before’ => ”, ‘after’ => ‘ ‘ ) ); ?> add the following code to your style. Css to give your last section a little style:. Col1,. Col2,. Col3 { width:30%; float:left; padding:0px 10px 10px 10px; height:450px; margin:0px; }. Col3:after{ clear:both; }. Col-header { background:#000; color:#fff; margin:0px; padding:1px; text-align:center; } at the end of the day, your custom wordpress 404 file should look something like: oh snap something just broke. Iknow it sucks, and you are not to blame. Please use the search box or the links below it:’, ‘wpex’ ); ?> home contact me hire me or check out popular content on my blog: popular posts most commented recent posts ‘postbypost’, ‘limit’ => 10, ‘format’ => ‘custom’, ‘before’ => ”, ‘after’ => ‘ ‘ ) ); ?> and your style. Css file should look something close to: /* theme name:your theme name theme uri: http://www. Yoursite. Com description: this is a child theme of your parent theme author: your-name template: your-parent-theme version: 1. 0license: gnu general public license v3 or later license uri: http://www. Gnu. Org/licenses/gpl-3. 0. Html tags: white, light, green, three-columns, two-columns, right-sidebar, flexible-width, custom-menu, featured-images */ @import url(“. /your-parent-theme/style. Css”);. Error-page-nav {margin-top:10px;}. Error-page-nav li {display:inline; padding:3px; font-weight:bold; font-size:1em; text-decoration:underline;}. Error-page-nav li:hover {text-decoration:none; }. Col1,. Col2,. Col3 { width:30%; float:left; padding:0px 10px 10px 10px; height:450px; margin:0px; }. Col3:after{ clear:both; }. Col-header { background:#000; color:#fff; margin:0px; padding:1px; text-align:center; } this is how my custom wordpress 404 page looks now: definitely much better than what we had at the beginning, right? and here are a few creative 404 pages for your inspiration. There are definitely no limits to what you can add to your custom wordpress 404 error page, just make sure the resources you include are relevant, and most importantly, useful to the user.

Are you afraid of errors on your wordpress platform? well, most of the time, we do not like errors. But, sometimes these errors are useful in creating value for the visitor or the webmasters. One of the similar error is the 404. The infamous 404 has a very vibrant history, and i guess you already know the meaning of the term 404 as you landed on this article. Today, we will list the best wordpress 404 error plugins that spices up the error page. But before moving on, i like to discuss on the 404 error term. Client-server interaction takes place by exchanging useful information over the internet. But, sometimes the client can request something that the server has no clue of. All other interaction takes place successfully, but the server could not return a resource that the user/client is looking for. To tell the visitor about the mishap, the 404 error is shown, which just means that the requested resource cannot be found. The error message can seem overwhelming for many of the non-tech visitors and there comes the role of best wordpress 404 error plugin. So, why the wait? let’s start the list of best wordpress 404 error plugin. The plugin will help you cope the 404 pages in a structured manner. 404 pages are linked to the theme, and we all know that customizing the 404 page requires custom coding and programming skills. This can be quite overwhelming for many of us and there comes the role of 404page. The 404page enables you to customize the 404 page just like any other page of the theme. You can also choose to set any page as the 404 page and see the magic roll in front of your eyes. Download 3. All 404 redirect to homepage if you are looking for a simple solution for the 404 error page. Then the plugin, “all 404 redirect to homepage” can work for you. This simple plugin uses the seo 301 redirection technique to redirect all the 404 pages to the homepage. According to the author of the plugin, it helps to make the website much more seo friendly. Download 4. Genesis 404 page wordpress plugin the theme 404. Php template file is tough to customize and with different themes providing different 404 pages, the proposition become more complex. With the help of the genesis 404 page wordpress plugin, you can easily configure the 404. Php template. The plugin only works with themes that are powered by the genesis framework. 5. Askapache google 404 google love optimize seo page, and you can also have optimized 404 pages with the help of askapache google 404. The plugin handles http errors in a structured manner and provides a google search bar into the 404 error page. The plugin utilizes advanced techniques such as google search api’s, ajax code and other seo optimized techniques to make the 404 web page as seo friendly as it can be. The latest update has also included the option of adding recent posts and related  posts. You can also choose to enable the thickbox for instant previews. 6. 404 to start 404 to start is similar to the plugin, all 404 redirect to homepage. It redirects all the 404 web pages to the start page using the permanent or temporary redirection. The choice of redirection can be either 301 or 302. 7. Google 404 no one deny the power of google and the importance it plays in searching content. Now, you can also add the google search to your 404 web page. With this, the visitors can easily search for what they are looking for. But, it has one drawback. The drawback is the user will not stay within the website. 8. Smart 404 smart 404 is one of those plugin that can automatically eliminate the need for the 404 error pages. The plugin automatically searches the website for similar kind of articles or blog post and divers the user to that specified page. With this, the users won’t be able to see the annoying 404 page and at the same time read something similar that they were looking for. So, how it is useful? it reduces the bounce rate of the website and hence increases visitors retention. 9. Easy 404 redirect unlike the plugin that i discussed above that redirects the 404 web page to the start page or the homepage of the website. Easy 404 redirect plugin gives you the choice of redirecting the 404 web page to any other page of your liking. This way, you can redirect the 404 web page to your landing page or any other page that can bring more visibility to your website. Wrap up there are tons of other errors that you can come up with wordpress, but the only error that is common and most frequent is the 404 error. The partial reason can be either server issue(deleted previous content that the user is now trying to access) or client problem(trying to access resources that are not present in the very first instance). Whatever may be the reason, it is a nice tactic as a blogger or wordpress webmaster to take care of everything including the 404 error page. The error page plugins make it easy for the visitors to understand the message and in a very pleasant manner. The plugin discussed here will eradicate all the problems that a website can go through 404 error page. Do, you like your default wordpress 404 error page? do, you want to customize it? then, the above-listed resources will help you to get started with it. Loved the article? comment below and share the post! *last updated 01/02/2020.

How to customize your WordPress 404 page.

Missing or broken web pages are never an ideal situation but with some careful planning they can be an opportunity to connect with the user and reinforce the brand message and the skills of the company or individual that owns the site. While 404 pages can be fun, they’re best avoided if possible so it’s a good idea to audit your wordpress site for broken links regularly so you can fix any mistyped links and re-direct pages that have moved. There are various plugins like broken link checker that can help you do this. If you’ve seen any funny, creative, or innovative 404 pages apart from the ones listed here, feel free to list them in the comments. We hope you enjoyed our article on best 404 pages. If you did, you may want to see our article on best wordpress plugins.

404 pages in wordpress are most often caused because of a change in the permalink structure of the site. If a site owner changes the permalink structure of their wp blog, they’re likely going to end up with incoming links pointing to pages that are no longer located at a particular address. This means those incoming visitors will be given a 404 page instead of the content they were looking for. Other causes of 404 pages may be in the code of your index. Php or search. Php files. If there’s an error in the code in either file, it may return results with invalid addresses (or it may not return results at all). If you’ve made customizations to your index. Php or search. Php files, it’s a good idea to check and make sure they’re not serving up invalid addresses and that all of your pages are still working. Always save a backup of the previous version of each file before making changes in case you need to roll back to an earlier version. One of the other common reasons you get a 404 page has to do with mod_rewrite not being installed on your server. In order to use pretty permalinks, you have to have mod_rewrite working on your server. If you’re trying to use pretty permalinks and are getting errors, this is the first thing to check.

Price: free this redirection plugin is quite different from the other plugins available on wordpress. Instead of manually creating redirects for individual urls, this plugin allows you to redirect all the 404 pages to your homepage. This means anyone who encounters a broken link on your website will be redirected back to your homepage instead of showing them the default 404 error page.

There are a lot of other resources out there that can help you deal with 404 errors on your wp blog or other website. Here are some of the best ones: check for dead links – part of an article in the wordpress codex that includes a number of links for finding dead links on your site. Creating an error 404 page – the official documentation from the wordpress codex. Customize your 404 page from the wordpress admin – a guide to creating a 404 page template that can be edited right from within wp’s admin area. Custom 404 pages for wordpress theme – a post that provides some great ideas for what you might want to include on a custom 404 page. Best wordpress 404 error page designs – a gallery with twenty awesome examples of 404 error pages. (the images above were all sourced through this post. ).

It’s important to redirect your visitors to a relevant page. If none exists, you still can capture your visitors’ attention with a custom 404 page. That way, you don’t lose quality traffic, and you provide helpful information to your visitors. Here are a few tips to build an effective 404 page. Clearly state that the page they’re looking for doesn’t exist. Add a search box to help visitors find what they need. Keep the branding of your 404 page consistent with other pages on your website. Encourage visitors to read your latest blog posts. Add humor, like a funny image, to engage your visitors. Need a little inspiration? check out these 404 pages here. Several 404 errors can interrupt the visitor experience, leading to high bounce rates. Rather than fixing each error one by one, an effective solution is to use a redirect plugin for wordpress. These plugins keep track of your 404 errors and redirect broken links to related pages. So, take the next steps to improve your website. Originally published oct 25, 2019 11:58:49 am, updated october 25 2019.

If you are not creating a theme from scratch by default all wordpress themes come with a 404 error page. You should locate this page 404. Php inside your theme folder. You can open it and begin editing this page to suit your design. If you are creating a wordpress theme from scratch, you should always include a 404. Php page in your starting files. It is usually taken care of if you are building your theme using a starter theme or framework like underscore. Every theme comes with its own 404 page, to customize the 404 page in your theme; you should begin by opening the file 404. Php in a text editor and try by editing the message on the 404 page then save and test it. For the purpose of this tutorial we are going to use wordpress default theme 2014 and edit the 404 page to suit our custom design. The default wordpress 2014 theme 404 page looks as shown in the screenshot below: we are going to customize to build a custom 404 page. This customization can be done on any other theme.

Step 1 – download your free forty four plugin. From your wordpress dashboard, click “plugins > add new”. In the “add plugins” page, type “forty four” into the keyword search field. Click “install now”. Then, activate. Step 2 – go to appearance > 404 page. Then, begin customizing the title, message, background image, and color. This is where you can add links and resources that help visitors find what they were looking for. It may be worth adding a way visitors can contact you – possibly a link to your contact page so they don’t have to look for it. The key here is to make things as easy for your readers as possible. You may opt to tweak your page’s appearance by using these controls. Step 3 – don’t forget to click the “publish” button before you view the page to see the changes you made. All done! now, let’s look at how to fix those broken links:.

How To Fix WordPress Page Not Found Error? Single Page or Entire Site

This article discusses why and how to redirect 404 page to homepage of wordpress websites. The http 404 error is basically page not found error. It can either be client side error or server side server. In client side error, a user types an url that is not valid or wrong. In such a scenario, the response from the server side will be null and hence, the user will see a 404 page not found error. On the other hand, when a client types an url or goes to an url from social media pages or search engine to your website but somehow that page is missing from your server, he will see page not found 404 error for no fault of the person. In such a scenario, it is important to redirect 404 page to the home page in wordpress so that the person can browse other things. Why does 404 error happen? there are various reasons why 404 error can happen. It could be due to the typing mistake of the user when he manually types an url. It is important to note that the user must type the domain name and extension correctly else you will not be able to redirect 404 page to the home page in wordpress. The most likely occurrence of 404 error from server side is when you migrate a website from one domain name to another or when you migrate it from one web server to another. The chances are more in the second case due to different permalinks structure and other factors. There are likely to be many broken links that you have to find out and fix, but in the meantime, you can redirect 404 page to the home page in wordpress so that users do not leave disappointed. This is a better approach than showing the users a customized redirect page which does not serve your purpose, and the users are likely to leave your site and check the same topic on your competitor’s site. How to redirect 404 page to the home page in wordpress using redirection plugin the first thing you need to do is install redirection plugin. You have to go to the dashboard and from the left menu, select plugins and then click on add new option. Search the plugin by its name and install and activate it. Then go to tools from the dashboard and click on redirection to set it up perfectly. In the screen shown above, you have to enter the 404 error pages’ urls one by one in source url and add the corresponding new urls to target url which could be the home page. Apart from that, it comes with various options to redirect people according to the source by changing the match option to url only, url and user agents (only for registered users and subscribers) and url and referrer (only for referring sites). The last two options will help subscribers, site members or referring sites to go to target url which may not be the home page and can be something similar to the old page that has got deleted or broken. Once everything is done, you can check yourself by going to the broken urls and see the expected result. The drawback of this method is the fact that you have to know the broken urls so that you can redirect to home page or any other page for that matter. There is a solution for that too. Redirection provides a tab to check the urls which people are typing wrong and the pages where people are getting 404 error. Accordingly, you can copy those urls and set the target urls. As a matter of fact, you can also detect bots that are trying to access each and every page to get a loophole to access your website from this list of 404 urls. You can block such bots by ip address and take necessary security actions. One of the best features of this plugin is that fact that if you happen to modify the url of an existing and published post, the plugin automatically sets a redirection for the old url which might have been crawled by the search engine. Another plugin which redirect 404 pages to directly homepage is all 404 redirect to homepage plugin how to redirect 404 page to the home page in wordpress using code if you do not want to take the headache of knowing the urls of the broken links and then fixing it and just want to redirect your 404 page to home page in wordpress, you have to write the following code. But before that, you need to connect your ftp to your web server and in the theme’s folder, you will find a file named 404. Php. In case you do not find it, you can create one with the same name. Open the file and paste the following. Save the file and disconnect ftp with the web server. Now, whenever a user types a wrong url, or he lands in a 404 error web page on your website, he will be redirected to the home page. Why should you fix 404 error at earliest? if your website has 404 error or broken links, google crawlers will downgrade your website because it is directly impacting user experience. For example, the search engine result page is showing a post link to the users from your website. When the user clicks on it and reaches your website, he finds out that the page does not exist. This is what leads to bad user experience. If you could redirect the user to a similar article url on your website through redirection plugin or at least send him to your homepage, it would have been better. Even having a 404 redirect page that will appear for every broken link will do instead of showing an error. Furthermore, it creates a bad impression to your subscribers, and they are likely to unsubscribe you if they get too many 404 errors after you have moved your site from one domain to another or from one web host to another. Therefore, redirect your 404 page to the home page in wordpress at earliest.

If i had to pick one single 404 plugin to recommend, it would be 404page. This particular free plugin doesn’t use redirects for its custom page. It allows you quite a bit of customization through the page editor in wordpress, so you can customize it as much as you would any other page on your site. You can choose featured images, set the title and text, add links, and so on. It doesn’t allow for dynamic animations or fancy coding, but if you want that, you need a custom page. Really, though, it’s not actually hard to make your own custom 404 page from scratch. You might have to learn a little bit of php, but not much, and only how wordpress uses it. It’s really quite simple, and there are a thousand examples online you can copy and customize easily. What’s really important is that you have something in place rather than a browser error page, that’s all. Looking for help with seo for your business or website? we have you covered. Check out our comprehensive seo directory to find the right seo agency for your needs.

As we mentioned earlier, sometimes your plugins and themes can affect your wordpress url structure, depending on their settings. If you tried one or both of the previous methods and the wordpress 404 error still persists, disabling your themes and plugins is your best bet. There are two ways to do this, depending on whether you have access to your dashboard or not. If you do have access, go to the plugins › all plugins tab and follow this process for each of your plugins: click on the deactivate button below the plugin’s name. Check your site, to see if the 404 error persists. If the error is still there, re-activate the plugin you disabled. Move to the next plugin on the list, and repeat the process. Your goal here is to eliminate each plugin as a suspect, one by one. You could disable all of them at once, but in most cases, it’s a single plugin that’s causing your problems. If disabling one of your plugins fixes the issue, you have three options. You can see if there’s an update available, keep the plugin temporarily disabled until there’s an update, or uninstall it and look for an alternative. If you’ve checked all your plugins and none of them is to blame, you’ll also want to make sure your active theme isn’t behind the 404 error. This process is much faster since you only have to check one theme. Go to your themes tab and switch your active theme to anything else: now, check to see if the wordpress 404 error is gone. If it is, then you again have to choose between looking for an update or finding a new theme. Switching wordpress themes can be a bit of a hassle, but it’s worth it in the long run if your current theme is resulting in errors. If you don’t have access to your dashboard, you can still disable your theme and plugins manually via ftp. To do this, access your website using filezilla, then navigate to the public_html/wp-content directory. You’ll find several folders here, two of which are called plugins and themes respectively: go into the plugins directory first. You’ll notice that there are individual folders for each plugin installed on your website. What you want to do is select one of those folders, right-click on it, and choose the rename option: change the folder’s name to something like akismet. Disabled, so you can still easily identify it. The mere act of changing the plugin folder’s name is enough for wordpress to disable it. Now, check to see if the 404 error is gone. If it isn’t, return that folder to its original name, and repeat this process in turn for each other plugin within the directory. If one of your plugins is behind the error, you know how to deal with it by now. However, if they all come up clean, you can move on to the wp-content › themes directory. Once you’re in, look for your active theme’s folder and rename it, just as you did with your plugins: since wordpress always needs an active theme, disabling yours will cause the platform to default to one of its out-of-the-box options. This can affect the way your website looks, but don’t worry, it’s only temporary. If the error is gone, you may need to look for a new theme. However, if it isn’t, feel free to restore your theme’s folder to its original name, so wordpress recognizes it again.

An easy way to make page-specific changes is to add wordpress’s many conditional tags to a template already in use. As the name suggests, these tags are used to create functions which are only executed if a certain condition is met. In the context of page templates, this would be something along the line of “only perform action x on page y. ”typically, you would add conditional tags to your theme’s page. Php file (unless, of course, you want to customize a different part of your website). They enable you to make changes limited to the homepage, front page, blog page or any other page of your site. Here are some frequently used conditional tags: is_page(): to target a specific page. Can be used with the page’s id, title, or url/name. Is_home(): applies to the home page. Is_front_page(): targets the front page of your site as set under settings → reading is _category(): condition for a category page. Can use id, title or url/name like is_page() tag. Is_single(): for single posts or attachments is_archive(): conditions for archive pages is_404(): applies only to 404 error pages for example, when added to your page. Php in place of the standard get_header(); tag, the following code will load a custom header file named header-shop. Php when displaying the page http://yoursite. Com/products. If ( is_page(‘products’) ) { get_header( ‘shop’ ); } else { get_header(); } a good use case for this would be if you have a shop on your site and you need to display a different header image or customized menu on the shop page. You could then add these customization in header-shop. Php and it would show up in the appropriate place. However, conditional tags are not limited to one page. You can make several statements in a row like so: if ( is_page(‘products’) ) { get_header( ‘shop’ ); } elseif ( is_page( 42 ) ) { get_header( ‘about’ ); } else { get_header(); } in this second example, two conditions will change the behavior of different pages on your site. Besides loading the aforementioned shop-specific header file, it would now also load a header-about. Php on a page with the id of 42. For all other pages the standard header file applies. To learn more about the use of conditional tags, the following resources are highly recommended:.

If you can nail the “helpful” part of your 404 page, you’re welcome to add humor and design perks after the fact just don’t put the cart before the horse. Now let’s break down the key elements that we used: the very basics: we’re using the 404. Php filename, so that wordpress knows to use this as the error page template. Our page title (inside an h1 tag) clearly states that a page wasn’t found. Offer a brief text explanation and offer some alternative solutions (check the url). Provide a search bar (using the default wp search form function) provide at the very least, a link to the archives. Advanced users might want to include a page, category or tag listing right here on this page as well. Provide a contact for people to report errors. Whilst it’s often very tempting to leave a humorous image & note on your 404 page, try to be as helpful as possible first, and funny later. Despite the fact there are entire websites dedicated to the hilarity of certain 404 pages, ensuring a visitor stays on and returns to your website is your first priority (unless you intend to be featured on one of those websites, in which case, go nuts!).

In this post, i will show you how you can easily fix your 404 error pages in wordpress using some free tools. WordPress is without a shadow of a doubt ‘the best’ website building tool. Would you agree? i simply could not imagine myself building websites using any other platform or css. Creating content in wordpress is one of my favorite things to do, especially now that we have plenty of tools and various apps to make our content look great. Yep, creating content in wordpress is pretty awesome, but what happens when you decide to remove content from your wordpress blog or website? oh yes, that’s right, you automatically generate a nice evil looking “404 error page”. Now, if you have done this a few times in the past and as a result ended up with a website that is generating lots of 404 error pages, don’t panic! today, i’m going to show you how to do something very simple but critical for fixing your 404 error page-not-found quickly.

There are some mixed debates about whether 404’s actually affect search engine rankings or not. Or, whether you might receive a penalty from google for instance. Personally, i do not know, however, there is an interesting post over on the moz blogabout 404 pages and seo. It’s quite detailed and you should check it out when you get some time. Regardless whether 404’s are good or bad for seo like i said to you, they can create a bad user experience on your site , and that my friends, google does not like. Google wants to see that you care about your website and it’s users, so it’s super-important that your content structure is top notch. If your wordpress blog or website ‘is your business’, your breadwinner, then i don’t think you would want too many of your website users bouncing away because you have too many error pages on your site, right? so the cure is this: let’s fix your 404 error pages.

What Causes Error 404 Not Found on WordPress?

404 page is often the most neglected page on most sites. Often a lot of wordpress themes 404 page looks like this: this 404 page in wordpress is handled by a template file called 404. Php. If your configuration is really messed up, then the 404 page would look like this: neither of the above 404 pages are really useful. When a user lands on a 404 page, they’re already frustrated. Why? because they can’t find what they were looking for. You need to help the user find the right page. You can help make this experience better by properly conveying the error, and give them a proper course of action (i. Ewhat to do next). This can be done by showing them other sections of your sites they can visit, give them a way to contact you, etc.

Now that you have detected which pages are causing the 404 errors on your site, what should you do? the first thing any self-respecting website owner needs to do is to create a personalized 404 page, in order to avoid users having to deal with a very ugly error page. The goal is to keep the user on your site, even if he didn’t find the page he initially wanted. Most wordpress themes allow you to create a custom 404 page (some page builders like elementor also allow it in pro version). And if you can’t do it, you will find many free plugins to do it, like 404page. Once installed, the 404page plugin will allow you to choose which page of your site will be used as a personalized 404 page. It also allows you to setup some more technical options, one of which caught my attention in particular: sending an error 410 instead of an error 404 when the page you are looking for is in the trash. Code 410 indicates that the resource is not temporarily unavailable, but that it has been permanently deleted. Google’s robots will understand that they can unindex this page. When you create your 404 page, feel free to include more personalized content: a nice little message, an animated gif , a search engine, a list of the most frequently visited pages… in short, help the user find the content they are looking for! to see a concrete example, click on this link and you will discover our magnificent page 404 (we are quite proud of it!).

A404 error is a page that’s displayed when a server is unable to find the requested content. In other words, when a visitor either clicks a broken link or enters an incorrect url on your site, they’ll receive a 404 error. For example, here’s our 404 page: as you can see, we have tailored our 404 page to match our branding and to provide a way back to our active content – a search form in this case. An effective 404 page that is customized lets people know they are on the right website. In addition, it can provide links back to your content, which can improve your overall engagement numbers. If you don’t customize it, your visitors will receive a generic page from your active wordpress theme: although this particular 404 page does have a link back to its main website, there isn’t another way to tell which site it belongs to. As a result, the user may decide simply to close the window and move on. After all, if they fail to find the content they were looking for on your site, they may look elsewhere. In contrast, with our 404 page the user knows exactly where they are. Moreover, we’ve provided a search bar to help direct them to what they were trying to find. Not to mention, if you were to scroll down the page of our example you would find links to some of our most popular content. Including elements such as these on your custom 404 page can help to prevent users from bouncing. In addition, you can increase your branding, as well as promoting trust and goodwill to your audience.

Moeez — may 17, 2017 • 4 minutes read if you have been using the internet for some time now, you must have come across the phrase “page not found”. It is an error page technically known as “404”. The reason for this error is that every time a user tries to reach a page for which a website cannot load or that a website’s link is broken, a “404” is generated and displays a message that says  “page not found” to the user. Each website handles this error in a unique fashion, but the idea behind all of them is the same. Moreover, the font and page style may vary from site to site. This article will help you in handling 404s on your wordpress website. The following points will be covered in this post: what is a 404 and how does it happen how wordpress deals with a 404 how you can design a good 404 page how to keep a user from leaving your website in case of a 404.

Keep in mind that 404 errors will be happening on your site—it’s almost inevitable. The larger a wordpress site grows, the more 404 errors it will have. We recommend you to get a good workflow for monitoring those types of errors and proceed with fixing them. The 404 errors are not pleasant to visitors, your brand, and search engines don’t quite like to see them too. We hope this was a helpful article. If it did not work for you, you can always contact our technical support experts via submitting a support ticket. Do you have any suggestions that we did not list? we will be glad to hear them in the comments below. Our goal for this post is to be as comprehensive as possible, and we are always open to suggestions.

WordPress is one of the most popular and easy-to-use tools for web development. People nowadays are using wordpress to create blogs, websites, and run their businesses. WordPress makes it very easy to put url onto a site and change the permalink structure for seo or any other purposes. Suppose you have successfully created a wordpress website, and you are about to launch it over the internet. Having said that, you do not know that there is a page link in your site which was supposed to be “http://www. Yourdomain. Com/gallery”, but you somehow put it as “http://www. Yourdomain. Com/galery”, which is wrong. Due to this error, your page will not show up whenever a user clicks on that page. So basically you have a broken link on your website for that specific page. This is where an error message should appear in order to make the user understand that there is something wrong.

If you’re experiencing 404 errors on a specific piece of content, the issue is likely that you: changed the url slug for that content. Moved that piece of content manually, e. G. By deleting the existing post and pasting it into a new post. Users then try to access the content at the old location and see a 404 page instead of the resource they were expecting. The best way to fix this is to automatically redirect anyone who tries to access the old location to the new location. That way, they’ll make it to the right spot without any 404 errors. It’s also good for seo. If you move or rename a post without adding a redirect, you lose all the domain authority attached to the backlinks pointed at that post. WordPress by default will attempt to redirect changed/moved content. But it doesn’t always work and you should never rely on wordpress for this functionality. But don’t worry, there are several easy ways to set up redirects in wordpress : first, you can use the free redirection plugin to manage redirects from your wordpress dashboard. Once you’ve installed and activated the plugin, go to tools → redirection and enter the 404 page url in the source url box and the new location of the content in the target url box: how to set up redirects with the redirection plugin if you’re hosting with kinsta, you can also manage redirects from the mykinsta dashboard. Using kinsta’s tool is actually a better way to go about it as the rules are implemented at the server level, which is a much more optimal way in terms of performance. It also means one less third-party plugin you have to worry about. Go to the site you want to manage. Then, click on the “redirects” tab. To add a new redirect, click the large “add redirect rule” button: how to set up redirects from your kinsta dashboard finally, if your host uses the apache server, you can use. Htaccess to set up redirects. The. Htaccess generator site can help you generate the proper code to add to your site’s. Htaccess file.

Creating a custom 404 page

Redirection is a plugin that lets you create custom redirects and find and fix 404 errors in wordpress posts and pages. With this plugin you can log and monitor all 404 errors that happens on your website. The plugin is completely free and is used on over a million wordpress sites. The first step is to download the plugin from the wordpress. Org plugin directory and install it. In the wordpress admin area, select tools and then redirection. On the plugin page, read the brief information and select start setup. On the second page, select the two first options: monitor permalink changes in wordpress posts and pages and keep a log of all redirects and 404 errors continue the setup: if the plugin gives you the green light, finish the setup. Otherwise, follow the instructions from the plugin. Wait for the plugin to do its magic, and click the finished button. Now you can add a new redirect by adding the source url and a new target url: in the plugin menu, select 404s to show a list of 404 errors. This list can help you determine if the links need to be redirected, or if someone only wrote a typo when looking for a specific post or page.

A404 error page alerts visitors to a missing page or incorrect url. Many websites use the default page provided by their theme, but 404 error pages can also be customized to improve user experience (ux). Most commonly, an error page will note the issue and provide alternative options for the user to choose from: for example, a return to the home page link, related content, or a search box. Agood 404 error page should contain a few essential elements. These include a link or navigation menu, an on-brand apology or explanation, and a search box. For example, cloud sigma opted for a quirky explanation and an easy-to-find back to homepage button. This helps to lessen the frustration, while also enabling the user to return to the main site with minimal interruption. Repair pal presents another good example of a well-implemented 404 error page. They opted to stick with their default theme — keeping the navigation menu intact — while also providing users with a way to immediately interact with the page. For example, visitors can get an estimate or troubleshoot your car. As you can see, creating a functional page is a useful way of mitigating the effects of a 404 error. They also ensure your website has an air of professionalism, despite an error being present.

Agood design for a 404 page should have a title showing the users this is a 404 page, the page should have a polite message about the error, and search function should be included. Link to the home page is an important way to keep the visitor on your website. You can also add a link to the popular pages or to the most relevant page like the archives. The following is the design for the custom 404 page for this tutorial:.

Custom post types are a great way to introduce content that has its own set of data points, design and other customizations. Afavorite use case for these post types are review items such as books and movies. In our case we want to build a page template that shows portfolio items. We first need to create our custom post type (cpt). This can be done manually or via plugin. One plugin option i can wholeheartedly recommend is types. It lets you easily create custom post types and custom fields. Install and activate types, add a custom post, make sure its slug is ‘portfolio’, customize any fields you need (such as adding a featured image), adjust any other options, and save. Now, that we have our portfolio post type, we want it to show up on our site. The first thing we’ll do is create the page in question. Be aware that if you chose ‘portfolio’ as the slug of your cpt, the page can not have the same slug. Iwent with my clients-portfolio and also added some example text. After adding a few items in the ‘portfolio’ post type section, we want them to show up on our page right underneath the page content. To achieve this we will again use a derivative of the page. Php file. Copy it, call it portfolio-template. Php and change the header to this: – page template to display portfolio custom post types * underneath the page content */ however, in this case we will have to make a few changes to the original template. When you take a look at the code of page. Php, you will see that it calls another template file in the middle, named content-page. Php (where it says ). In that file we find the following code: ” > ‘ ‘. __( ‘pages:’, ‘twentytwelve’ ), ‘after’ => ‘ ‘ ) ); ?> ‘, ‘ ‘ ); ?> as you can see, it is here that the page title and content are called. Since we definitely want those on our portfolio site, we will need to copy the necessary parts of this template to our page. Php file. The result looks like this: get_header(); ?> to get the portfolio items onto our page, we will add the following code right beneath the the_content() call. ‘portfolio’, // enter custom post type ‘orderby’ => ‘date’, ‘order’ => ‘desc’, ); $loop = new wp_query( $args ); if( $loop->have_posts() ): while( $loop->have_posts() ): $loop->the_post(); global $post; echo ‘ ‘; echo ‘ ‘. Get_the_title(). ”; echo ‘ ‘. Get_the_post_thumbnail( $id ). ”; echo ‘ ‘. Get_the_content(). ”; echo ‘ ‘; endwhile; endif; ?> this will make the cpt show up on the page: i’m sure we all agree that it looks less than stellar, so some styling is in order. /* portfolio posts */. Portfolio { -webkit-box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0. 75); -moz-box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0. 75); box-shadow: 0px 2px 2px 0px rgba(50, 50, 50, 0. 75); margin: 0 0 20px; padding: 30px; }. Portfolio-image { display: block; float: left; margin: 0 10px 0 0; max-width: 20%; }. Portfolio-image img { border-radius: 0; }. Portfolio-work { display: inline-block; max-width: 80%; }. Portfolio h3{ border-bottom: 1px solid #999; font-size: 1. 57143rem; font-weight: normal; margin: 0 0 15px; padding-bottom: 15px; } much better, don’t you think? and here is the entire code for the portfolio page template: – page template to display portfolio custom post types * underneath the page content */ get_header(); ?> ‘portfolio’, // enter custom post type ‘orderby’ => ‘date’, ‘order’ => ‘desc’, ); $loop = new wp_query( $args ); if( $loop->have_posts() ): while( $loop->have_posts() ): $loop->the_post(); global $post; echo ‘ ‘; echo ‘ ‘. Get_the_title(). ”; echo ‘ ‘. Get_the_post_thumbnail( $id ). ”; echo ‘ ‘. Get_the_content(). ”; echo ‘ ‘; endwhile; endif; ?>.

If the default 404 message is bland and not terribly helpful, what should you include in its place? a good design will include: design and branding that matches the rest of your website. Ahelpful message that informs visitors the page wasn’t found. Links to relevant pages on your site, such as the home page or popular pages, to encourage the visitor to stick around. Perhaps a humorous image or tone, if that’s your style. An effective 404 page will help you keep your visitors from clicking away and encourage them to further explore your site. You should also track your site’s 404 errors and create redirects when you are able to forward users on to their intended destination. Agood custom 404 page changes a dead end into a doorway that encourages visitors to come inside and stick around. No website is complete without one.

A404 page is something every site has, technically, but not many sites necessarily customize. Every web browser has a page they deliver to a user if there is no actual content on the url they are given. If you were to visit some page like http://www. Dfsalhasdhjbfe. Com/, you would get a browser-based 404 page because the url does not exist. Unless someone registers it just to mess with this post, which would be weird. Now if you go to a page like “https://www. Seoblog. Com/dfhsdhaf”, you will find that you still resolve the core domain – seoblog – but not the subpage, which doesn’t exist. You get a basic 404 page, which has the top and sidebar navigation options, but no content in the middle. See the difference? one of them implies that the site doesn’t exist at all, while the other acknowledges that the site exists but does not have that specific content. There’s reason #1 why you should have a custom 404 page: it confirms to people that they’re on the right website, but a single page they may have been looking for does not exist. This is a lot better than throwing into question whether or not the site itself exists. If the user gets a browser-based 404, they might think your site is dead, and won’t bother coming back. Acustom 404 page also acts as a sort of soft-sell landing page. It’s not as focused as a landing page, and it’s not something you would ever use as the target of ads, but it does serve to help catch people who fall through the cracks. Custom 404 pages serve to increase branding as well. Ageneric 404 page doesn’t bring any additional benefit to a user who finds themselves there, while a custom page at least carries the atmosphere of the site forward. You can also use a custom 404 page to bring added benefit to any user. For example, you can replace the primary 404 content with a site search, so a user can use that search to find the actual url of the page they were looking for. You can also use a related posts plugin to dynamically generate popular links to other pieces of content on your site, or just used fixed links to link to evergreen posts you want to promote. Convert users who fell through the cracks into users who read other pieces of content. If you find that a significant number of people are landing on your 404 page, you can even turn it into a lead generation landing page. It’s still a 404 page, and google will still not like it as a landing page, but you might be able to squeeze a few customers out of it. Though, if you do find a significant amount of traffic leading to a 404 page, you should probably figure out why. You might have broken scripts or broken redirects that you need to fix. You might have broken internal links, and if they’re passing that much traffic, you should fix them too. You also might have external links pointing to your site that are broken. If that’s the case, message the site owner to get them fixed; a broken link doesn’t pass much link juice, and someone else could come along and “broken link build” their own link in place of yours, poaching all that traffic.

If you see the 404 error on all of your website’s content, it would typically mean an issue with the permalinks of your wordpress website. You might see the error only on separate pieces of content. In that case, it is probably because of some changes that you have made without setting up a redirect. The 404 error is not necessarily bad – it’s negative only when it’s interfering with the usability of your wordpress website. Remember that sometimes there are things out of your control and that’s no reason to panic. For example, it is possible that someone types a false url in their browser’s address bar. In such a case, they would see a 404 error, but there wouldn’t be any actual problems with your wordpress site and the way it’s configured. A404 error is the actual desired response in this scenario, and you can even make your customized 404 web page to help visitors get to their destination.

WordPress Page Not Found Final Words

To make 301 redirections really easy for my website, i like to use a good old-fashioned plugin. In my opinion, there are only 2 plugins you should really care about for 301 redirections, here they are – pretty link – this is a fantastic plugin perfect for redirecting ugly links and making them no-follow such as affiliate links and long url’s on your page that you want to shorten, etc. You can also use pretty link to redirect 404 generated pages. Redirection – the best plugin to use, by far, is the redirection plugin. Iuse this very plugin to redirect all of my 404 error pages. This is the plugin that i’ll be showing you how to use to fix your 404 error pages below. If you already have the redirection plugin installed on your wordpress blog, you’re ready to rock-and-roll. If you haven’t got this installed yet, then download it and get it installed and activated! right, finally, let’s begin.

What can be done to improve this situation? how can the mistake be turned into an opportunity? in search of ideas and guidelines we can consult wordpress codex or google webmaster guidelines as perfect starting points. Actually, our main task is quite simple: explain why a page can’t be located and offer suggestions for getting to the right screen. From this point of view we can derive a list of possible components that creates a “perfect” 404-error page: a clear error message in a simple and friendly manner, with apologies for the inconvenience; the look and feel of the rest of the site with clear branding and navigation options; possible alternatives and hints on how to find the desired information. Asearch form, links to relevant and/or popular content and the homepage are all possible solutions for this part; a way to report an error if the user wants to; you can provide a contact email or other contact information. From this list we can determine useful tips and ideas for what to include in a 404-error template: recent and/or popular posts, or alternatively random posts; subscription options (like rss) in addition to contact details; sitemap, especially in the case of small sites; promotions or information about your offers and services; branding materials to easily identify your site and your industry; information about the requested url and most relevant content; tagcloud as a quick way to place the visitor into the context of your site; a notification and/or tracking system to be aware of any 404 errors on your site. One important thing about a 404-error page is a proper 404 http status that should be served by the server. Fortunately, wordpress handles this for us automatically, so that we can focus our efforts on creating the page itself. We need the active theme to have a separate template for the page named 404. Php. The bare bones structure of the template is quite simple: the markup that creates the page structure should correspond with what’s used by the active theme. Alternatively, some additional styling can be provided to imitate that structure. By including the standard calls get_header and get_footer we ensure that the page has all the branding elements and navigation options and all scripts and styles are loaded properly. Now, when we have made the initial preparations, let’s fill in the page. The best thing we could do for the visitor on the 404 page is to guess what’s actually requested and provide the closest possible match. Information about the requested url is stored by wordpress in the $wp->request property. We can parse that string and try to find similar content based on post_name data, which stores information about post and page slugs. If such a search does not return anything meaningful we can try a regular search through post content. If these efforts do not produce any positive results we can always provide a list of recent posts as a fallback. Of course, we also include the friendly message, the search form and a link to the homepage. First we are going to create some auxiliary functions to handle some template routines; they could be included in functions. Php of your theme or directly in the beginning of 404. Php file. Function frl_get_requested_slug(){   global $wp;   $q = $wp->request;   $q = preg_replace(“/(\. *)(html|htm|php|asp|aspx)$/”,””,$q);   $parts = explode(‘/’, $q);   $q = end($parts);   return $q; } frl_get_requested_slug function tries to obtain the requested page slug using the global $wp object and regular expressions. The code assumes that the site uses permalinks and the request goes in the appropriate form. Function frl_list_posts($posts){   if(empty($posts))   return ”;   $list = array();   foreach($posts as $cpost) {     $title = apply_filters(‘the_title’, $cpost->post_title);     $url = get_permalink($cpost);     $list[] = ” {$title} “;   }   return implode(”, $list); } frl_list_posts helps to quickly output a list of post links, accepting an array of wp_post objects as arguments. Function frl_load_error_style(){   if(!is_404())   return;   $src = get_template_directory_uri(). ‘/css/error-style. Css’;   wp_enqueue_style(‘error-style’, $src); } frl_load_error_style loads custom styles with the 404 template, assuming that the appropriate. Css file is located in the /css folder inside the active theme’s directory. The template code as we planned includes four parts: the friendly message; the search; the recent posts list; the last chance. The friendly message: 404: page not found sorry, unfortunately, we could not find the requested page. Let’s find the information you need. The search for the requested content: ‘any’, ‘post_status’ => ‘publish’, ‘name’ => $q, ‘posts_per_page’ => 5 ); $query = new wp_query($args); //query posts by slug if(empty($query->posts)){ //search for posts $q = str_replace(‘-‘, ‘ ‘, $q); $args = array( ‘post_type’ => ‘any’, ‘post_status’ => ‘publish’, ‘s’ => $q, ‘posts_per_page’ => 5 ); $query->query($args); } if(!empty($query->posts)): ?> were you looking for the one of the following pages? posts);?> first of all, we perform a wordpress query with an initial set of arguments which looks for the requested slug in a post/page name field. If we don’t get any results after that, we replace dashes in the requested string with spaces and perform another query that searches for the requested words in the posts/pages content. If we’ve obtained any results we then output them with the help of the previously created frl_list_posts function. Recent posts list: ‘post’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 5 ); $query->query($args); if(!empty($query->posts)): ?> why not take a look through the most recent posts? posts);?> in this part we perform a query for the 5 most recent posts in the blog and output them in the same manner as previously. The last chance: no good? please use the search form to try again or start browsing from the ‘>homepage. If you need further assistance please don’t hesitate to contact at [email protected] Com. Finally, if none of the above options satisfy the user, we offer a link to the homepage and provide a search form.

Forty four – 404 plugin for wordpress is a simple and lightweight plugin that lets you modify its design with ease. Agreat thing about it is that it doesn’t load any unnecessary scripts, css or images. This means that your visitors won’t have to wait too long for your page to finish loading. With the forty four – 404 plugin, you get to change the background image, color scheme and the way your text looks like. The only thing that you can’t change, however, is the search box, which has to remain on this page. Here’s an example of how your 404 page can look like with this plugin: once you installed the plugin, you can find it by going to appearance > 404 page section in your dashboard. As soon as you take a look at the plugin screen, the way to use it will be clear to you straight away. This is because it has an identical structure to that of a regular wordpress page. Namely, it contains a field for entering the title, as well as the text field. In other words, all the text that you enter into these fields will show up on the page itself. Below you will notice the presence of some additional options, such as for changing the text and background color, whether you want your background to be a picture or simply a color instead, if you want to hide the 404 title, and more. We’d also like to mention the back to home text option. If you end up deleting the text from this field, then the link that leads to the home page won’t show up on the 404 page. On the right corner of the screen, right underneath the publish button, you have an option that allows you to add your own background image. This setting activates as soon as you publish the page. We’ve also customized our own error 404 page with this plugin. You can see how it looks like in the picture below. If you’re interested, there is also a premium version of the plugin that contains some extra options, such as an ability to add a custom logo or menu on your 404 page.

At times, when accessing a wordpress site, you might have stumbled upon a 404 error page. It is a page that pops up when a visitor tries to access a web page that doesn’t exist in the site. Unfortunately, not many wordpress site owners give due importance to the 404 pages, making it the most neglected page in a wordpress site. However, creating this page user-friendly can play a vital role in encouraging users to stay on your site. The best way to do so is to create a custom 404 page containing useful elements. When any user lands up on a blank 404 page, they’ll most likely be frustrated as they cannot find what they’ve been looking for. And so, it is important for you to helps your visitors know what they need to do next. You can do so, by creating a custom 404 page that help your website visitors to find something worthwhile in your site, thereby keeping them stick to the site. Note: if you can code then, it is ideal to carry out the process of creating a custom 404 page on your own. But, if you don’t have good programing knowledge and skills, then it is recommended that you should consider employing wordpress web development services of any reputed development company. In this post, we’ll talk about the process of creating a custom 404 error page in wordpress. In addition, we’ll review the elements that you can add in that custom page to make it user-friendly. Understanding the process of creating a custom 404 page the first thing we need to do is start by creating a 404 page template that’s tailored according to your theme. To add a custom 404 page to a wordpress site is simple; and requires you to simply include a file titled ‘404. Php’ within your theme directory. Not to mention, if the ‘404. Php’ file is empty, it will display nothing to users. The ideal way to create a custom 404 page that works in sync with your theme is to copy the page. Php file contents and paste them to your newly created ‘404. Php’ file. After completing this step, make sure to get rid of the code that refers to “the loop” and change it will the code as follows: requested page not found sorry, but the page you requested has not been found now, when a user arrives at your website’s and sees a standard 404 error page, chances are that they’ll hit the back button and will search for the content somewhere else. However, to make your visitors stay on your site, you will have to provide them the content they want. To do so, it is important to implement elements in the 404 pages that your users might be interested in, such as the most recent and popular posts and so on. Elements you should consider adding in your custom 404 page presenting the most popular posts on 404 page this is an ideal element that any wordpress blogger should consider. It’s obvious that you would like to present your most popular content to your readers. Doing so, can help you get more pageviews. There are many great plugins out there that help display most popular posts on your site to the viewers such as wordpress popular posts, popularity posts widget, stylish popular posts, etc. Once you’ve selected the plugin you want to use, install and activate it. And then, add the following template tag in your 404. Php file at the exact location where you would want to display your popular blog posts: displaying the most commented posts once you’ve added the functionality, enabling users to view your most popular posts, you can even choose to display the most commented posts in your website sidebar. Presenting your users the content that starts a discussion on your site, means more user engagement leading to increase website traffic. You can display your website most commented posts using the wordpress most popular plugin, and after activating the plugin you just need to add the below given template tag to your posts, as it will help you present the most engaging content on your site to your visitors: showing up the most recent posts on your 404 page apart from showing up the most popular posts on your custom 404 page, you might need to display the most recently published posts to your users. Although, there are numerous ways to achieve such an objective, however, the easiest way requires adding the template tag such as the one given below in your 404 template: ‘postbypost’, ‘limit’ => 12, ‘format’ => ‘custom’, ‘before’ => ”, ‘after’ => ‘ ‘ ) ); ?> final words in this post, we’ve talked about only the three most important elements that you can add in your 404 page, however, there are several other elements that can be added on your 404 page such as a search box allowing users to search for anything within your site, or a list of “what to do” options to help users take the right course of action and so on. Facebook.

Published by alex on june 14, 2019 • 0 comments • lire en français the other day, while i was checking my twitter feed, having my coffee (what, don’t you do that?), a tweet from a friend caught my attention. This friend strongly recommended reading an article that looked really interesting. Iwas happy to read it quietly before starting my work day… except that by following the link, all i found instead of this great article was a blank page with an error message: “404, page not found”. You can imagine how disappointed i was. How frustrating to find an error message or a blank page when browsing the internet, don’t you think? i am sure that you too, in your life as an internet user, have already encountered, and more than once, the path of a 404 error. It often takes the form of the message “404 not found” or “page not found”. These errors are a real plague for the internet user, but also for us who create or manage wordpress sites. The good news is that there are solutions to correct them! and since we love giving you a hand, we’ve put together a complete guide to learn how to fix a wordpress 404 error. To begin, here are the points covered in this article: note: if you want to know more about wordpress errors, check out our extensive guide to wordpress errors (and how to fix them). Often, 404 errors occur when you click on a link to a page that has been deleted, renamed, or moved. The url is therefore no longer valid. 404 errors are common after a site redesign – because old pages may no longer exist, but are still indexed on search engines or other sites. They will also appear if you change the slug of a post, as this will change the permalink (url). This will also be the case if you change the permalink structure on your site: for example, if your article urls look like mysite. Com/category/title-of-my-article and you want to replace them with mysite. Com/title-of-my-article. Finally, 404 errors frequently occur due to simple input errors: if a user types mysite. Com/blob instead of mysite. Com/blog, boom! error 404! as i’m sure you’ve understood, 404 errors are an integral part of internet life, and can hardly be avoided. The issue for site managers is that 404 errors have a negative impact: on your users’ experience: nothing is more frustrating than clicking on a link and landing on an error message! on your seo: when search engine robots browse the links to your site, they will detect each of these 404 errors. If a site generates many errors of this type, its ranking will go down, especially if there are backlinks referring to a page not found. To learn more about the impact of 404 errors on your seo, you can watch this video from matt cutts, a very influential expert in the world of seo.

Compatible up to: wordpress 4. 2. 4last updated: 2015-6-28 current version: 1. 4. 1rating: 4. 4out of 5 stars (5 reviews in total) much like our other options, custom 404 pro enables you to replace your theme’s default 404 error page with a custom one. The plugin offers basic three choices: choose a custom page from your wordpress admin panel. Enter a custom url. Limit yourself to just going over the logs from all 404 errors. 404 pro – which despite its name is completely free – does offer a unique feature. It records the keywords that led users to the error page and also includes custom filters to narrow down other interesting data in case you want to dig deeper. The plugin’s author, kunal nagar , prefers that users use 404 pro’s github repository in order to open issues rather than wordpress’s support forums. Nagar appears to be on top of most requests for troubleshooting and feature implementation with speedy response times.

Another plugin that lets you control your custom 404 page, is the custom 404 pro plugin. Download custom 404 pro the plugin lets you assign any pages that you have created as custom 404 page for your wordpress website. It will replace your default 404 page if you already have included in your theme. This plugin also allows you to specify a url for page or post that should be redirected for 404 not found errors. You can define the settings and make the changes in the admin page of the plugin. Go to custom 404 pro -> settings and select your custom 404 error page from the drop down menu. You can select either a specific wordpress page or a url for all the 4o4 redirect requests. WordPress page: select any wordpress page as a 404 page. Url: redirect 404 requests to a specific url the plugin also has 404 logs section that will show you details such as what keywords lead the visitors to the 404 not found url on your website.

5. Check Plugin or theme conflict to fix admin dashboard 404 error

In cases where the above doesn’t resolve the errors, check to make sure your. Htaccess file is set up with the proper permissions so wordpress can write to the file. For details, check out understanding file permissions and using them to secure your site. If you needed to update the permissions, try the steps above again. There may be a plugin or theme conflict if your errors are still persistent. To troubleshoot the issue further, activate the default wordpress twenty seventeen theme by going to appearance > themes in your admin dashboard. Hover over the default theme and click activate. Next, check your site to see if the 404 errors or white screen of death are gone and if they are, the theme you were using is the culprit. You can contact the theme author and report the issue so they can fix it and release it in a future update. If the errors still appear, then you can switch your theme back to the one you were previously using and deactivate all your plugins instead. Go to plugins > installed plugins. Then, click deactivate for each of the listed plugins or bulk deactivate them all by clicking the plugins checkbox toward the top, choose deactivate in the dropdown box next to it and click apply. Now check to see if the errors have left the building, so to speak. If that did the trick, then reactivate your plugins one by one all the while, checking your posts in between each activation until the error reappears. When it does, the last plugin you activated is the cause. To fix it, notify the plugin author so they can fix it. In the meantime, you can search for a suitable alternative that you can use until the issue is resolved.

Sometimes a wordpress website for seemingly no reason at all delivers the dreaded 404 “page not found” error for pages and posts that actually exist. This error is mostly prompted when you navigate from home page to other pages of your website. Usually, the 404 page not found error occurs if you mess with website settings or some other plugin modifies them. 1. Issue: a wordpress website shows “404 not found” errors on all the pages except home #method 1: re-save permalinks you can reset the permalink by going to the permalinks tab in wp-admin and simply re-saving the permalink structure. Navigate to: wordpress dashboard → settings → permalinks and click “save changes. ”if resaving permalinks doesn’t help, try changing your permalinks structure. Choose one that you don’t use and click save changes. Now change your permalinks setting back to your original configuration which was likely /%postname%/. View your home page again and see if the permalinks reset fixed wordpress page not found error. This will update your permalinks settings and flush rewrite rules. In most cases, this solution fixes the wordpress the requested url was no found on this server (404 error). #method 2: update your htaccess file manually if above method doesn’t fix your issue with wordpress 404 page not found error, then you probably need to update your. Htaccess file manually. Login to your server using ftp, or using cpanel and modify the. Htaccess file which is located in the same location where folders like /wp-content/ and /wp-includes/ are located. Be noted that. Htaccess is a hidden file, so you must set all files as visible to be able to edit. You can delete. Htaccess file (download it before just in case) or just rename it (revert back when done) and see if the issue still persists. The. Htaccess file will be automatically generated again if you delete it or rename so don’t worry. You can also remove all code and manually add below code in your. Htaccess file to revert it to default: #method 3: disabling all plugins more than once i was able to solve 404 not found error on my wordpress site just by disabling all plugins. Start by deactivating plugins one by one to see if any of plugins cause the issue. Every time you deactivate plugin, just refresh your site and check if issue is gone. If you cant access you site admin then deactivate all plugins through cpanel or using ftp by renaming plugins folder or plugin one by one. You will find plugins folder under /wp-content/plugins. Just rename plugins folder to anything you want. Don’t forget to return it later. You can apply the same system for particular plugins. You can also try switching your current site theme to wordpress default theme (twenty sixteen for example). If you cant access your site admin just rename your theme through cpanel or ftp and it will be switched to default wordpress theme automatically. #method 4: optimizing database if you tried above methods and still seeing 404 errors, then the next step i would recommend is a database optimization. Now in this case of page not found error, this is a long shoot and for me it never solved issue. But still, you can try. While database optimization can be done through cpanel using phpmyadmin i would recommend using plugin for anyone that doesn’t want to risk messing somehing or does not have acces to cpanel. You can use plugin like wp-optimize. Also, many security plugins and some cache plugins like wp rocket have already integrated database optimization feature s you can utilize that. If this method also didn’t help you solve wordpress page not found error, then i can only recommend that you contact your hosting support and see if they can help you. 2. Issue: wordpress website shows “404 not found” error because of broken link or incorrect inputted url this issue is usually isolated case and does not impact the whole site. It is probably case of broken link on your site. The easiest way to find those dead links is using “google webmaster tools”. If you already submitted your site to google webmaster tools, then you can find those dead links under crawl errors option. Another way you can find dead links is by using wordpress plugin called broken link checker. When you get the dead link, then just redirect the page to another page or home page. For redirection of links, i use redirection plugin.

If your 404 errors are due to permalink changes, there’s a quick fix. You’ll just flush (or refresh) your permalinks on your website. Go to settings > permalinks in your wordpress admin dashboard. Then, scroll down without making any changes and click save changes. WordPress will automatically update your. Htaccess file. Now, check your website for any remaining 404 errors. If they still remain, your next option is to use a 404 redirect plugin.

2013-12-09 8:38 pm est hits: 3,506 karahizon. Com vegwahine. Karahizon. Com and both of them have 404 errors whenever i access certain pages in the dashboard. I’ve already check and manually upgraded the wordpress but i still get the same errors. Idid not update nor post nor install anything new, they just started getting errors and i don’t know since when because i haven’t been updating the sites since august the latest. Karahizon. Com –> whenever i post, i got the 404 error on /blog/wp-admin/post. Php i also dont have access to the plugins. Php vegwahine. Karahizon. Com –> cannot access plugins and widgets themes etc lastly, my third site, lomolocoshop. Com is getting internal server errors whenever i access the widgets page.

Log on your wordpress dashboard, go to appearance >> editor. You will then open the editor where you can edit your wordpress theme files directly. From the top right corner, you will need to select the theme you want to edit its 404 error page template. Then all files for this selected theme will be listed, click to open the 404. Php or 404 template, you can edit it in the theme editor. If you want to know what pages (pages that do not exist) your site visitors tried to access that triggered the 404 error, you can install seo ultimate plugin, it has a 404 monitor module you can enable to check urls with 404 error, how many visits or hits occur, date of most recent hit, what pages or urls refer to those non-existing urls. Google webmaster tools is also a great tool that can help you diagnose the 404 urls. Again here is the link to how to fix 404 errors using google webmaster tools?.

You may accidentally disable the wp-admin url by using security plugins. Most of the security plugin changed the default wp-admin and wp-login. Php links so that no one can assume your login url. And when you will try to access your dashboard by writing wp-admin or wp-login. Php at the end of your site name, it will show you the not found error. So you should check if you have recently installed any security plugin. Check its configuration if you have already opened the admin area. If not you should access the server by using ftp or cpanel and rename the security plugin folder. It will be located at/public_html/wp-content/plugins/, here you have to find the plugins folder name. It may be itheme security or wordfence or any other plugin. After renaming the plugin folder, the respective plugin will get disabled and you can try again to access the wp-admin and it will work now. Some time misconfiguration of security plugin can also lead to sorry you are not allowed to access this page error.

You may also face 404 not found for the wp-admin area due to themes or plugins conflict. So you should access the server by cpanel or ftp and try renaming the plugins one by one and check the wp-admin area if working. If you still facing the issue it means your theme may be also faulty. So simply activate any default wordpress theme. Sometimes old or outdated wordpress themes do not work properly with all plugins and even with wordpress core too so you should check it by disabling them. Ihope the steps given above will help you solve wordpress 404 not found issue. You can fix it by using the wordpress dashboard or by accessing ftp or cpanel. If you do not have access to the wordpress dashboard or if this is not working for any reasons then you should use the second method by accessing the server files. Iwill be more than happy when you will let me know if this is a real help for you and which option works best for you.

About the Author: admin

One Comment

  1. clean slate tax

    on March 2, 2020 at 2:10 am - Reply

    Thank you for the auspicious writeup. It actually was once a amusement account it. Glance complicated to more brought agreeable from you! By the way, how can we keep up a correspondence? clean slate tax recently posted...clean slate taxMy Profile

Leave a Reply

CommentLuv badge