Report this

What is the reason for this report?

Why aren't my Wordpress permalinks working?

Posted on December 5, 2016

I have a Wordpress site in a sub directory:

/var/www/mysite/

When I visit http://myip/mysite/ it works with “Plain” permalinks (i.e. http://myip/mysite?page_id=6) and I can navigate the site.

However, when I use “Post name” permalinks (i.e. http://myip/mysite/mypage/), I get a 404. It works fine locally. This is what my .htaccess file looks like:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mysite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mysite/index.php [L]
</IfModule>
# END WordPress

Under Settings > General in Wordpress, I have both the Wordpress Address and Site Address set to:

http://myip/mysite

What am I missing?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.