简体   繁体   中英

Wordpress: stuck after installing Wordpress and copying in wp-content directory

Completely new to Wordpress and I am working on a collaborative project however I am having trouble getting up and running.

This is what I have done so far...

  1. Installed MAMP.
  2. Went to PHPmyadmin and created a database (eg myblog).
  3. Downloaded Wordpress.
  4. Copied and pasted existing wp-content into my downloaded Wordpress folder in htdocs and also renamed that folder from 'wordpress' to '/myblog'.
  5. Went to localhost selected /myblog.
  6. Installed Wordpress
  7. Went to dashboard click visit site.

Now getting Not Found

The requested URL /myblog/lessons/orientation/ was not found on this server.

Would anyone know what I am doing wrong here?

You need to add the htaccess rewrite rules for WordPress to your MAMP server. Without these rewrite rules, the browser request doesn't actually get routed to be handled by WordPress.

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

In MAMP, you have to add these rules in the MAMP app itself and not in an .htaccess file (unless you specifically configure MAMP to allow that).

Here is a screenshot of where to do that in MAMP 2, the field is called "Customized Virtual Host Directory Settings"

在此处输入图片说明

控制台>设置>永久链接尝试更改您的永久链接设置。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM