WordPress is a CMS, so posts, pages, and archive views are generated dynamically from data in the database. Even though a site may have thousands of URLs, most requests are routed through the main index.php entry point.
Why set pretty permalinks?
On a default installation, a post URL might look like https://example.com/index.php?p=123. The domain is the site address, index.php is the WordPress entry file, and ?p=123 tells WordPress which post ID to load.
How do you remove index.php?
If you want cleaner and more SEO-friendly URLs, open Settings → Permalinks and choose any structure other than Plain. Saving that setting enables WordPress pretty permalinks.
Server support for pretty permalinks on Apache, Nginx, and IIS
If the homepage still works but inner pages break after changing permalinks, the server probably is not configured to support URL rewriting. In other words, WordPress is ready, but the web server still needs matching rewrite rules.
Nginx rewrite rules
Most modern WordPress sites run on Nginx. To support WordPress pretty permalinks, add a standard try_files rule in the virtual host configuration and then reload Nginx.
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$args;
}
IIS rewrite rules
Not many WordPress sites run on IIS, so this article does not walk through the full setup. If you need it, the usual references are the IIS URL Rewrite module and Microsoft’s guide on enabling WordPress pretty permalinks.
- IIS URL Rewrite module
- Enabling Pretty Permalinks in WordPress
Apache rewrite rules
Most Apache servers support rewrite rules through .htaccess. If .htaccess is enabled, WordPress can usually create or update the necessary rules automatically when you save the permalink settings.
If your Apache server does not support .htaccess, ask the administrator to enable it or follow an Apache guide for enabling rewrite rules manually.
In practice, pretty permalinks are one of the baseline requirements for a healthy WordPress server, and clean URLs are also a basic part of WordPress SEO.
