Found the issue! Seems that the <Directory>
in the .conf file in Apache2 was not configured correctly.
An example of a correctly configured .conf file is as follows:
# domain: exampleurl.com
# public: /var/www/html/exampleurl.com/public_html/
<Directory /var/www/html/exampleurl.com/public_html>
Require all granted
AllowOverride All
</Directory>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName exampleurl.com
ServerAlias www.exampleurl.com
DocumentRoot /var/www/html/exampleurl.com/public_html
ErrorLog /var/www/html/exampleurl.com/logs/error.log
CustomLog /var/www/html/exampleurl.com/logs/access.log combined
</VirtualHost>
Including AllowOverride All
seems to fix the permalink issue.
Remember to run service apache2 reload
in Terminal once you overwrite your .conf file.
Related Posts:
- Strange permalink issue: can’t rename /company-2/ to /company/
- How to get permalink and title from post ID?
- Pretty permalinks for search results with extra query var
- Using $_GET variables in the URL?
- Removing leading zeros from custom permalink structure
- How do I turn off 301 redirecting posts (not canonical)?
- How can I include a query string with get_permalink
- Post being redirected to attachment post
- Without index.php in permalinks I get 404 across site
- Changing Permalinks to a Custom Permalink causes a 404 Error [no matter what I do]
- How to assign a Permalink to a Function
- How to get blog id from permalink?
- Redirect user if it’s not logged in
- Rewrite-Rules not working on a vhost, everything goes to index.php
- Date archive permalink modification
- How to get this JavaScript working with get_permalink
- Add a css class to a taxonomy permalink
- Change of permalink structure – redirects in htaccess breaks the archive links
- Changes to permalink structure results in 404 error for all pages other than home
- echo post-permalink without http and www
- How to get permalink in foreach loop
- CPT Post Title Permalink: Replace “@” (or all special characters) with dash “-” instead of just removing
- Disable permalinks on all pages and posts
- Custom add_rewrite_rule & permalinks
- Custom permalink for search and pagination
- Rewrite Rule for default post type
- WordPress permalinks that end with a hyphen result in a 404
- add_rewrite_rule not working for me
- get permalink of page children in loop
- Confusing about permalink
- List / Get post redirects
- Programmatically Restrict WordPress from using certain URLs or sub-directories
- Title attributes on Permalinks for posts and products
- Permalinks problem – Category pages don’t work
- How to include sub directory in sitemap? [closed]
- example.com/index.php/%postname is working while /%postname is not working WordPress on IIS6
- 301 Redirect for Non-Date Based URL’s
- Custom $_GET vars in wordpress entry with permalink
- WordPress Not Using Template Files After Permalink Update
- Permalinks only for posts
- rewrite rule to redirect to the most recent date permalink
- File access different with permalinks on and off
- mod-rewrite exception? keep #hash in matching urls?
- How to link the title adding a permalink?
- Visiting posts results in 404 errors after host migration
- Suddenly new posts have the default permalink instead of the post name
- Permalink Settings
- get_posts post title permalink not working for last item in array
- Can’t get permalinks working!
- WordPress not generating .htaccess but tells me that (Permalink structure updated.)
- Permalink with anchor on home page to single page
- Add category into post permalink
- Add post overwriting permalink from previous post in 4.6
- How do I keep multiple domain for my wordpress site
- Custom permalink structure with %postname% in front of domain name
- Add variables to all permalinks in site
- What is the right way to clean up $title before wp_insert_post?
- How to get links to user and tag by its name?
- Create custom links for excerpts with php dynamically
- placing the media uploads in a subdirectory
- Multiple sites with pretty permalinks with nginx
- mod-rewrite rules grabs “broken permalinks”, too
- How to Use metada Value in Url and is it possible? [duplicate]
- Custom child page permalink
- How to allow slash(/) on page url
- Safest way to create a custom permalink
- Creating an alternate path for a page
- Permalinks causing wp-json to 405
- Parent/Child Categories Permalinks
- How to prevent wordpress from lowering Capitalized letters
- An excluded ‘ghost’ page is crashing my permalink
- Yoast and permalink troubleshooting
- WordPress Multisite ABSPATH and get_home_path() to check for htaccess or web.config file
- Disable -2 Permalink Addition
- Permalink in relation with the files
- Every sub page shows Error 404, i have check permalink but still same issues
- WordPress project redirecting to a blank index.php when i use custom templates
- Changing permalink structure for Posts
- Allowing slash in slug/permalinks
- Custom Permlinks work, regular page permalinks don’t
- How to redirect from old standard wordpress permalink structure to new custom one
- Author permalink
- Multiple Permalink Patterns for one page
- When is a good time to reset permalinks?
- wp_dropdown_categories links 404
- Permalink for Author’s Posts in a Category
- Search and replace post URL’s on page output?
- Two urls for one website
- Added incorrect rewrite rule now getting an error
- WordPress Pagination Not Working After Transfer from Localhost
- Accidentally changed the permalink structure
- Keep wordpress from modifying my permalinks
- Permalink Issue – Funny & Weird
- How is a URL getting mapped to a page template
- customize urls displayed by previous_post_link and next_post_link
- Routing ‘fake’ sub sub posts
- Files placed in directory with wordpress 404
- Page and post auto links
- how to make follow?
- Permalinks Won’t Work