0
votes

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]
2
Can you access this Page1 by ?page_id=xxx ? - Bud Damyanov
@bodi0 No that just redirects me to /page1 which is 404 page not found. - Weblurk
It's weird. Even if I delete the content of my .htaccess file, nothing happens differently. It's like it has no effect. I'm kinda new to editing these hidden files on a Mac via the terminal - Weblurk
Thank you! I had the .htaccess file under the wrong folder. After moving it to the root folder everything started to work correctly. If you write an answer regarding this I will mark it as the correct answer. - Weblurk

2 Answers

2
votes

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).

1
votes

Just go to Wordpress admin page,

then Click on Settings > Permalinks,

Then Click Save Changes.

This will be fixed.