Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Using WAMPSERVER for windows 7, smartgit and Safe Search Replace I have pulled a wordpress code from my git, downloaded a database and inserted into my localhost's phpmyadmin. My home page works but when I click on one of the links I get the WAMP homepage. What am I doing wrong?

I have tried the following in WP-Config to use the localhost URL instead of the one saved to the database but it didn't work:

define('WP_HOME','http://127.0.0.1/website'); 
define('WP_SITEURL','http://127.0.0.1/website'); 
share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Ok, based on that, I'm almost positive that you need to re-enable permalinks for your site. You are probably missing your .htaccess file or it is missing WordPress's rewrite rules.

Go to your admin and find Settings > Permalinks. Select an option, and click "Save Changes" twice (there is a quirk that this avoids).

This will have WordPress automatically regenerate your .htaccess, which appears to be your problem.

share|improve this answer
    
Thanks so much, works perfect, you saved my day. –  Arthur Mamou-Mani Mar 3 '13 at 16:05
    
Glad the solution was found. Sidenote: The permalinks are flushed on the "Settings > Permalinks" page load, so no need to even save a single time. –  kaiser Mar 3 '13 at 20:37
    
Visiting the page will not, however, create or modify an .htaccess file. –  Matt Van Andel Mar 7 '13 at 17:31
add comment

You probably have just the wrong links saved in the DB you pulled. WordPress only stores absolute URLs in the DataBase.

share|improve this answer
    
Thanks kaiser, how could I check this? I thought replacing the names using the search replace tool would take care of this... –  Arthur Mamou-Mani Mar 3 '13 at 15:17
    
Open wp-config.php (in your WordPress installs root directory). You can add the following to wp-config.php force it to use your localhost URL instead of the one saved to the db: define('WP_HOME','http://localhost'); define('WP_SITEURL','http://gsff.dev'); –  Matt Van Andel Mar 3 '13 at 15:28
    
@MattVanAndel don't I need to replace all the urls if I use blabla.dev instead of 127.0.0.1/blabla? Unfortunately I still get the same problem. –  Arthur Mamou-Mani Mar 3 '13 at 15:49
    
I have tried the followin: define('WP_HOME','http://127.0.0.1/website'); define('WP_SITEURL','http://127.0.0.1/website'); but it doesn't work –  Arthur Mamou-Mani Mar 3 '13 at 15:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.