Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialchao wu
Courses Plus Student 6,327 PointsDownload Wordpress project and develop locally
I downloaded a wordpress project from C panel and want to develop locally. the wp-config.php is set to local, but when i open the site locally , i got 404 page not found, it may be caused by url direct, how to fix this?
2 Answers
mikes02
Courses Plus Student 16,968 PointsYou just need to update a couple of areas to match your directory structure where WordPress is installed:
# 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
mikes02
Courses Plus Student 16,968 PointsHi Chao,
Aside from the wp-config.php setup you will likely need to modify your local .htacess file so that your RewriteBase and RewriteRule settings are accurate.
chao wu
Courses Plus Student 6,327 Pointsthe folder structure looks like this: localhost/mySite/ how should i modify the .htacess file to match this folder structure
luangma
2,279 Pointsluangma
2,279 PointsNot sure, but have you setup your local testing server and database? If so, then the issue might be that permalinks weren't updated.