Installing or migrating a fresh copy of WordPress and clicking on that newly created navigation link then seeing a page a big 404 not found error can be infuriating! These type of errors are some of most commonly experienced while using WordPress. Sometimes we need to go ahead and make WordPress fix permalinks after migration or install.
What You Need
In order to diagnose the issue we need to know the following information:
- What operating system and server is your web host running on?
The operating system we use for our servers is Windows Server 2016 which runs IIS 10 however most WordPress servers are ran in some flavor of Linux with Apache.
- What type of error are you getting?
Most likely you will be seeing a “Page Not Found” or 404 status error. This will usually occur after first setting up a new site or migrating an old one then clicking on your first internal link (like the navigation menu).
The first question can be answered by either asking your web host. Most WordPress websites are ran under some flavor of Linux using the Apache web server. However, this isn’t always the case. It is best to ask your webhost if this is unknown.
The second question will ensure that this article is the correct place for you to be in order to solve your error. If your error does not say “Page Not Found” but instead says “Server Error” this is not the article for you. Feel free to Google further.
I have a 404 error, wonderful!
I don’t have time to waste. Is there anything I can try first as a quick fix?
Yes, do the following steps if you are having trouble with permalinks. These steps are designed to work in any operating system:
- Go to your WordPress control panel.
- Click on Settings.
- Click on Permalinks.
- Make sure post name radio button is selected.
- Click Save.
After clicking save WordPress is designed to create the appropriate configuration files within the filesystem that it needs to make permalinks work.
If permalinks are still not working after trying this quick fix and you are still getting a 404 page not found error please go on to the next sections in order to try a more comprehensive fix.
My pages still aren’t loading, why could this be happening?
Believe it or not, the WordPress fix permalinks after migration issue is usually related to insufficient file system permissions. If the file permissions are set up properly then your website will automatically create the appropriate configuration and allow your page links to work normally. If these configuration files are failing to be setup, or permalinks are not supported by your host then you will quickly know it.
WordPress File Permissions
WordPress has the ability to fix missing configuration files that will repair the majority of permalinks related problems. If file permissions are not set correctly there will be no way WordPress will be able to fix itself. Changes will have to be made directly on the host. If you do not have direct access to the web server running your website it is best to contact your service provider in order to assure the correct permissions.
Hosting providers worth their weight will allow file permissions changed via popular FTP clients. The process can look slightly different depending on which operating system is being used:
When one copies files onto a file system or directory they get assigned a set of default file permissions. These default permissions are usually inadequate for a proper working copy of WordPress. At best WordPress runs in a “read only” mode where it cannot interact or write to files in its installation. This causes issues such as the permalinks failing.
Linux and Apache – WordPress File Permissions
In Linux file system permissions are represented by numbers. For the brevity of this article we will not go into their meaning. The process for changing permissions via an FTP client will not change drastically. Popular FTP clients such as Filezilla will display the “Read, Write, and Execute” permissions along with their numeric equivalent. If someone says to “chmod” something in an article, they are referring to changing the file system permissions in a Linux environment.
Apache configuration files go by the name of “.htaccess”. These files control different aspects of the web server including Permalinks.
Windows and IIS – WordPress File Permissions
Windows IIS configuration files go by the name of “web.config”. These files control different aspects of the web server including Permalinks.
The main web.config file sits in the WordPress main directory. In an IIS environment most FTP clients will not allow the modification of any permissions and might look like the following:
As you can see there isn’t anyway for us to change these permissions. Specifying permissions manually will usually throw a command not understood error in your ftp client. If this is the case and are sure the web host is using a windows environment it may be necessary to contact your system administrator or move on to the next steps.
Conflicted / Outdated Plugins and Themes
WordPress plugins are usually self-contained pieces of code that expand the functionality of the WordPress environment. However, too many plugins or those that have bugs can cause entire sites to fail. It is often times hard to diagnose these types of issues without systematically turning off each of your plugins one at a time. Another way to diagnose these is to use server error log messages if you have direct access to your server environment or through a panel.
Go ahead and try switching all of your plugins and themes off one at a time. Do this until the error or issue you are experiencing goes away. If it does then you will know for sure if it’s a theme or plugin related issue.
Server Host Misconfiguration
Installing and hosting a web server for WordPress can be a time consuming and difficult task. If it is not done correctly many strange errors can occur. If a server is configured with too tight security then sometimes configuration files created by WordPress can be ignored.
Please note: if this WordPress setup is new and not a migration it is much more likely that your server is correctly configured.
It might still be a good idea to talk to your web host administrator if possible to make sure.
Sometimes it is possible to further diagnose server related issues if there is access to the PHP error log file. A server administrator can access these to diagnose less-than-obvious issues.