What are permalinks?
A permalink is the permanent web address of a post or page. For example, yourdomain.com/about-us. WordPress builds these addresses using rules stored in a file called .htaccess. A hidden file is a file whose name starts with a dot, and this is one of them.
Sometimes those rules break. This can happen after a move, a plugin change, or an update. Then your posts show a 404 error, which means "page not found". Resetting permalinks rebuilds the rules.
Method 1: Save permalinks again
- Log in to your WordPress dashboard.
- Go to Settings, then Permalinks.
- Look at the option that is selected. Do not change it.
- Scroll down and click Save Changes.
- Visit one of your posts to test it.
This one step fixes most cases.
Method 2: Switch to Plain and back
Use this if Method 1 did not work.
- Go to Settings, then Permalinks.
- Write down your current setting.
- Select Plain and click Save Changes.
- Go back to the same page.
- Select your old setting again, for example Post name.
- Click Save Changes.
Method 3: Check the .htaccess file
If WordPress cannot write to the file, the reset will not work.
- Log in to your hosting control panel and open File Manager.
- Go to your site folder, often
public_html. - Enable the option to show hidden files.
- Find
.htaccess. Check that it exists. - Right-click it and look at its permissions. A common safe value is 644.
- If the file is missing, create a new empty file named
.htaccess. - Go back to Settings, then Permalinks, and click Save Changes.
WordPress will fill the file with the right rules.
Pick a good style
Most sites use Post name. It gives short, clear addresses. Pick one style and keep it.
Quick recap
- Permalinks are the web addresses of your pages.
- Go to Settings, then Permalinks, and click Save Changes.
- If needed, switch to Plain and back, or check .htaccess.
- Do not change the style on a live site without a reason.