简体   繁体   中英

MAMP + Wordpress - Can't get local site to function

I have installed MAMP and am trying to get a local dev version of a Wordpress site running on my computer.

I've gone through many tutorials explaining what I need to change in wp-config.php and the db but I'm not able to get the page to function.

The siteurl & home fields in the db have both been updated to http://localhost/ and I've updated wp-config.php for db username & password to be root .

I've set WP_DEBUG: true so that I get a bit of feedback as to what might be causing the error and the following is what I get when I try to go to http://localhost/ :

Fatal error: 
Uncaught Error: 
Call to undefined function mysql_error() in /Users/oldo/Desktop/Website Development/Clean Cut Concrete/mirror/public_html/cleancutconcrete.com/wp-content/plugins/revslider/inc_php/framework/db.class.php:29 
Stack trace: 
#0 /Users/oldo/Desktop/Website Development/Clean Cut Concrete/mirror/public_html/cleancutconcrete.com/wp-content/plugins/revslider/inc_php/framework/db.class.php(127): UniteDBRev->checkForErrors('fetch') 
#1 /Users/oldo/Desktop/Website Development/Clean Cut Concrete/mirror/public_html/cleancutconcrete.com/wp-content/plugins/revslider/inc_php/revslider_params.class.php(42): UniteDBRev->fetch('wp_revslider_se...') 
#2 /Users/oldo/Desktop/Website Development/Clean Cut Concrete/mirror/public_html/cleancutconcrete.com/wp-content/plugins/revslider/inc_php/revslider_operations.class.php(1275): RevSliderParams->getFieldFromDB('general') 
#3 /Users/oldo/Desktop/Website Development/Clean Cut Concrete/mirror/public_html/cleancutconcrete.com/wp-content/plugins/revslider/revslider_front.php(42) in /Users/oldo/Desktop/Website Development/Clean Cut Concrete/mirror/public_html/cleancutconcrete.com/wp-content/plugins/revslider/inc_php/framework/db.class.php on line 29

Would anyone have a suggestion on how to go about fixing this problem?

The question was answered by Saqib Amin in the comments above, but I thought I'd post the answer here as well so that it's obvious. As pointed out to me, mysql_* functions have been removed in PHP 7, so I changed MAMP to use PHP 5.6.10 and it's now working.

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