Title: PHP problem on localhost
Last modified: May 17, 2020

---

# PHP problem on localhost

 *  Resolved [alicebensi](https://wordpress.org/support/users/alicebensi/)
 * (@alicebensi)
 * [6 years ago](https://wordpress.org/support/topic/php-problem-on-localhost/)
 * Hello,
    I have a weird technical problem, I’ve lokked and serached and found 
   nothing that helps me.
 * I’m trying to work on localhost, I was running the website (which is still empty
   of my own content) until yesterday morning with another theme, on a Mac with 
   Mamp and local installation of wp, all was fine. Then I purchased a new theme
   and first I had problems with importing the demo content, which was solved by
   Bluehost changing some php setting on the server, not entirely sure what, something
   to do with php7. Now the website with full demo is running fine on [https://alicebensi.photography](https://alicebensi.photography)
 * I then proceeded moving it all to localhost, I actually
    -wiped everything out
   from previous installation, -reinstalled mamp -created a new localhost database-
   exported my database from bluehost -downloaded the zipped folder of my wordpress
   website -imported db in local (changing the names from alicebensi.photography
   to localhost) -copied the website folder in the htdocs one of Mamp where my localhost
   is etc. All of this I have successfully done before… but now it’s not working:
   when I try to navigate to [http://localhost](http://localhost), which runs index.
   php, the page gets downloaded by the browser instead of loading. The content 
   is there… it’s the code not being interpreted? I’m really not sure what to make
   of this, being pretty ignorant about the topic.
 * I’ve found a few threads about this issue searching around, but none of the help
   I could get solved the problem.
    At some point I followed instructions to removing
   the AddHandler line from the .htaccess file and that allowed me to see my homepage
   and whole website on localhost BUT when trying to access localhost/wp-admin, 
   that was getting downloaded again. I could get to the login form on localhost/
   wp-login.php BUT when pressing the login button… my dashboard was downloaded 
   as a text file! I’m very confused. Bluehost couldn’t help after long chat. I 
   hope you guys can!Please!
 * Thank you
    Alice
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-problem-on-localhost%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [JNashHawkins](https://wordpress.org/support/users/jnashhawkins/)
 * (@jnashhawkins)
 * [6 years ago](https://wordpress.org/support/topic/php-problem-on-localhost/#post-12846934)
 * Your purchased theme doesn’t work on your localhost?
 * But another theme worked just fine?
 * You might try asking the theme provider for help… We don’t have access to commercial
   themes here but from what you’ve said there might be something in the theme itself
   or else the theme requires a newer PHP version…
 * The theme provider should be able to tell you what steps to go to next.
 * I’m thinking a PHP upgrade or else possibly a setting in the localhost to allow
   a certain option to work.
 *  Thread Starter [alicebensi](https://wordpress.org/support/users/alicebensi/)
 * (@alicebensi)
 * [6 years ago](https://wordpress.org/support/topic/php-problem-on-localhost/#post-12846989)
 * SOLVED!!!
    So I managed of course it was simple :-))
 * As I said, removing the AddHandler line
 * AddHandler application/x-httpd-ea-php70 .php .php7 .phtml
 * from the .htaccess file CONTAINED IN MY ROOT FOLDER, made the website show up
   properly. Why then the wp-admin was still not working?? BECAUSE THERE IS ANOTHER.
   htaccess file INSIDE THE wp-admin FOLDER which I didn’t know about and no one
   who tried to help ever mentioned to me, which needed same treatment (removing
   the AddHandler line) to work. Now everything works fine. Hope this can help!!
   
   Thank you Alice
 *  [Peter](https://wordpress.org/support/users/petersnet/)
 * (@petersnet)
 * [6 years ago](https://wordpress.org/support/topic/php-problem-on-localhost/#post-12848783)
 * [@alicebensi](https://wordpress.org/support/users/alicebensi/) Thanks so much,
   you save a life here. I had the same issue and the problem was resolved. Muchas
   Gracias.
 *  Thread Starter [alicebensi](https://wordpress.org/support/users/alicebensi/)
 * (@alicebensi)
 * [6 years ago](https://wordpress.org/support/topic/php-problem-on-localhost/#post-12850984)
 * Awesome! I know how you feel 😉

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP problem on localhost’ is closed to new replies.

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 4 replies
 * 3 participants
 * Last reply from: [alicebensi](https://wordpress.org/support/users/alicebensi/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/php-problem-on-localhost/#post-12850984)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
