Question

I followed this guide for installing WordPress multisite on MAMP: http://perishablepress.com/wordpress-multisite-mamp/

And it seems to be working fine. I can access WordPress admin, and the site itself. However, whenever I create a page and try to visit it, I get an 404 error, as if the permalink url is broken or something, but I can't figure out what's wrong.

Example:

  • mysite.domain.local <-- Works
  • mysite.domain.local/wp-admin <-- Works
  • mysite.domain.local/page1 <-- Doesn't work, even if I have created the page "Page1"

My htaccess file looks like this, in accordance with the guide I followed:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
Was it helpful?

Solution

You can remove your custom-edit from your .htaccess file and edit the permalinks settings (i.e. revert to default), save the changes. This way Wordpress will be forced to re-generate it (if it has any errors) and everything should work.

This .htaccess file should be located in root of your Wordpress installation (you may have other .htaccess files in sub-folders as well).

OTHER TIPS

Just go to Wordpress admin page,

then Click on Settings > Permalinks,

Then Click Save Changes.

This will be fixed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top