I am trying to run a local version of a live Wordpress site, however, after setting up the local environment and attempting to access:
http://localhost/wordpress/
I receive the following error:
This webpage has a redirect loop
The webpage at http://localhost/wordpress/ has resulted in too many redirects.
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
Whilst I cannot visit the site, I am able to access the dashboard for the site locally at:
http://localhost/wordpress/wp-admin/
I have been trying to fix this for many hours, and have had another wordpress expert (who already runs a local version of the same site) spend 2 hours hashing through this with me. No luck. I would appreciate any help. As hopefully useful background:
To run the local version I installed MAMP, and both the MySQL and Apache server are green. I have placed a copy of all the site files in MAMP/htdocs/wordpress. I have exported the site database as an .sql file, created a new database in the phpmyadmin page loaded through MAMP, and imported the .sql file.
I have also updated the config.php file to have the following details:
define('DB_NAME', 'database_name');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', 'root');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
I have also changed all the wordpress urls to run off localhost:80/wordpress through a SQL find and replace statement.
My .htaccess file contains the following:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ /index.php/$1 [NC,L,QSA]
</IfModule>
# END WordPress
All of this setup yields the error when trying to view
If anyone requires any further information or any of the above is not clear, I will be happy to provide. Thanks in advance for any help.
Settings >> General
, what are the values for WordPress Address (URL) and Site Address (URL)? Also, try renaming.htaccess
tohtaccess.broken
or something similar. Does that fix the problem?