WordPress.org

Forums

Updated MAMP & now can't get my local WordPress running (32 posts)

  1. lamollner
    Member
    Posted 10 months ago #

    The installation of the new version (5.5.10) of MAMP seemed to go fine on my MacBook until I tried to open the local WordPress site I was using on the previous version of MAMP. I've been working on this problem for more than 4 hours. I'm able to start the servers and open localhost:8888 which gives me the html version of my site's home page with no CSS from the WordPress site working. I'm not even sure how to describe the problem I'm having. I just know that I was able to login to a local WordPress site using the old version of MAMP and now I can't figure out how to log back into WordPress again in the new version. Can anyone help me figure this out.

  2. michalzuber
    Member
    Posted 10 months ago #

    Hi, I would check web server's error_log and enable WP's debugging

    # this goes into wp-config.php
    define('WP_DEBUG', true);
    define('WP_DEBUG_DISPLAY', true);
  3. 2by2host
    Member
    Posted 10 months ago #

    Definitely more debugging info would be helpful but if you can't log in you will not be able to install any plugins. Is it an option for you to start from scratch?

  4. lamollner
    Member
    Posted 10 months ago #

    Thanks for your responses michalzuber and 2by2host. I'm new to working with the behind the scenes parts of WordPress but I will look into the debugging information. I think I could start from scratch and reinstall WordPress, I just don't know what to do to get all the work I've done on a child theme back into the install. Does that make sense? I created a child theme of the theme Canvas and did all sorts of updating and changing of things to personalize the site for a client. Is that all lost now?

  5. 2by2host
    Member
    Posted 10 months ago #

    In think case make sure you backup your database and files before a fresh install (make sure the new version is the same as the one you currently have) then try to re-import your DB. This is something a developer would be able to help with.

  6. lamollner
    Member
    Posted 10 months ago #

    Ok, 2by2host. I will back everything up and the try a new install. Then I will try and figure out how to reimport the DB. I don't know any developers who can help me but I'll see what I can figure out. I don't work at a web design studio or anything (yet, obviously!) So, thanks again for your help. I'll post my results after a new install.

  7. michalzuber
    Member
    Posted 10 months ago #

  8. lamollner
    Member
    Posted 10 months ago #

    Thanks for the DB restoring information michalzuber.

  9. lamollner
    Member
    Posted 10 months ago #

    Ok, I figured out how to reinstall wordpress so things are working in this regard. Now I just need to tackle restoring the database so I'll be looking at the instructions posted by michalzuber.

  10. lamollner
    Member
    Posted 10 months ago #

    How do I find the database that I need to import? All I see are full wordpress sites with all the files with them. Where would a DB be?

  11. 2by2host
    Member
    Posted 10 months ago #

    Specifically for MAMP you should be able to access your PHPmyAdmin tool at http://localhost:8888/phpMyAdmin This might ask for logins which you could get from your wp-config.php file. From there you should be able to take a dump of the database. Another way to login would be to use root credentials. This would give you access to all databases.

  12. lamollner
    Member
    Posted 10 months ago #

    I've been able to access the PHPmyAdmin tool. However, I just don't understand the next steps. I'm looking at the wp-config.php file in Coda and I see that the db name is localwp. I guess what it might be is that I don't have an official backup of my WP database. I have several different files that contain all the WP site files but they must not technically be backups. I think I'm really close to understanding what to do, I just can't figure it out.

  13. 2by2host
    Member
    Posted 10 months ago #

    The steps should be pretty simple:
    From phpMyAdmin select the database then click on the "Export" tab. This will take you to the place where you can export the DB. Select the "select all" check box to make sure you are going to save all of the tables. Below you should be able to see a few formats to save in. You can do regular .sql (uncompressed) or .zip or .gz formats (compressed).

  14. lamollner
    Member
    Posted 10 months ago #

    I understand the process you are describing but I don't know if the correct database is available through phpMyAdmin. As I wrote earlier, I've successfully reinstalled WP, it's just definitely not connecting to my original database and all the updates I had made. I just went through the process you described to Export a wordpress database. I don't know where the exported db went and I don't know how to install it with my new version of WP. I'm sorry to be so frustrating, your instructions are all very understandable, I'm just not getting it. Really sorry...

  15. lamollner
    Member
    Posted 10 months ago #

    So, I guess another description would be that I have WP installed with an altered HTML home page showing my previously designed home page. However, no CSS or other parts of the Canvas theme are working. I have also entered a support ticket on the Canvas theme site. Somehow I am not pointing to the correct database or folder is what it seems to me.

  16. 2by2host
    Member
    Posted 10 months ago #

    I think you now need to copy your files over from the backup. Also, check to make sure the paths are correct. Are you able to navigate the admin area without any problems?

  17. 2ninerniner2
    Member
    Posted 10 months ago #

    @lamollner -

    The latest version of MAMP is 3.0.5, 14 April 2014. Not sure what or where you got the 5.5.10 from or if it is even "MAMP" from appsolute GmbH.

    That said, I updated my previous MAMP to the latest and the automated process moves your HTDOCS and database to the new version and keeps the old version but renames it adding the date and time of update to the file name.

    NOTE!!! if you had your MAMP icon in the dock, DO NOT USE THIS ONE to start the new version! You are starting the old one! Go to Applications and use the one there that is MAMP and double click the mampp.app icon there. The new version has a totally different control panel.

    So in Finder, have a look in Applications. If you are running the "real" MAMP, you should have MAMP (the current 3.0.5 version), MAMP PRO (comes along with the install so you can try it out) and MAMP_xxxx_xx_xx_xx_xx_xx (where the x's are the date and time you did the update). Do you have these?

    My update went fine on my Mac mini (with the latest Mavericks). All my sites (numerous WP sites and a few eFront ones) moved over and work just fine.

  18. lamollner
    Member
    Posted 10 months ago #

    Thanks again 2by2host for all your help. And thanks also now to 2ninerniner2 for your post. I think I got mixed up with 5.5.10 as it looks as if this number corresponds to one of the two PHP versions you can choose in MAMP. I think I'm doing ok with using the new version vs. the old version as I'm seeing the new control panel. It sounds like your conversion to the new MAMP worked with all your WordPress and eFront versions just fine. I wonder what happened to me then. Ugh.

    Thanks again for all the infomation everyone has shared. I'm just going to keep trying to figure out what I can. Sigh....

  19. lamollner
    Member
    Posted 10 months ago #

    Here is the code from wp-db.php that seems to indicate that I'm not connecting to my database correctly. I'm not sure what it all means unfortunately but maybe those of you who have been helping me will recognize something in the code:

    * Connect to and select database
    *
    * @since 3.0.0
    */
    function db_connect() {

    $this->is_mysql = true;

    $new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : true;
    $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;

    if ( WP_DEBUG ) {
    $error_reporting = false;
    if ( defined( 'E_DEPRECATED' ) ) {
    $error_reporting = error_reporting();
    error_reporting( $error_reporting ^ E_DEPRECATED );
    }
    $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
    if ( false !== $error_reporting ) {
    error_reporting( $error_reporting );
    }
    } else {
    $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
    }

    if ( !$this->dbh ) {
    wp_load_translations_early();
    $this->bail( sprintf( __( "
    <h1>Error establishing a database connection</h1>
    <p>This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at %s. This could mean your host's database server is down.</p>

    • Are you sure you have the correct username and password?
    • Are you sure that you have typed the correct hostname?
    • Are you sure that the database server is running?

    <p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.</p>
    " ), htmlspecialchars( $this->dbhost, ENT_QUOTES ) ), 'db_connect_fail' );

    return;
    }

    $this->set_charset( $this->dbh );

    $this->ready = true;

    $this->select( $this->dbname, $this->dbh );
    }

  20. lamollner
    Member
    Posted 10 months ago #

    And here is a browser message I got right before going to the PHP file:

    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) in /Applications/MAMP/htdocs/localwp.com/wp-includes/wp-db.php on line 1147

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

  21. 2ninerniner2
    Member
    Posted 10 months ago #

    Just to clarify a few things:
    - on the old MAMP, you accessed the WP site with http://localhost:8888
    - this means:
    -- you used the default settings for the Apache port (8888)
    -- you installed WP in the root of the server, i.e. Applications/MAMP/htdocs (generally, this is not a good idea as it clutters up the root of the server); put it in a folder in htdocs, such as wordpress1, wordpress2, etc.
    -- your database connection should have been (if you didn't touch anything in MAMP or phpMyAdmin):
    -- database name: whatever you named it
    -- host name: locahost
    -- user: root
    -- password: root

    Have a look in wp-config.php of the site in the NEW MAMP and check the values. They should be the same if you didn't change any of the setting in the new MAMP.

    Also, you didn't mention if you can access and log in to the WP dashboard on the new MAMP, even if it is "without CSS". If you are able to do so, go to Settings > Permalinks and just re-save. If you had permalinks other than the default in the old MAMP, the htaccess may need to get refreshed (that is what re-saving the permalinks does).

  22. wirelessvictory
    Member
    Posted 10 months ago #

    Does anyone finally got it all working?

  23. lamollner
    Member
    Posted 10 months ago #

    Latest update:

    I am able to get to the HTML version (with no CSS) of the home page content at localhost:8888 but I am not able to login to the database. I'm getting an error message that indicates that there is a problem connecting to the database. I have been able to get to the login screen but, as I wrote earlier, that didn't work. Also, I'm not able to get to a WP dashboard to try the resaving of the permalinks.

  24. lamollner
    Member
    Posted 10 months ago #

    Here are the latest messages I'm getting:

    Warning: mysqli_real_connect(): (28000/1045): Access denied for user 'lamollner'@'localhost' (using password: YES) in /Applications/MAMP/htdocs/stmarys/wp-includes/wp-db.php on line 1342

    Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /Applications/MAMP/htdocs/stmarys/wp-includes/wp-db.php on line 1372

    Warning: mysql_connect(): Access denied for user 'lamollner'@'localhost' (using password: YES) in /Applications/MAMP/htdocs/stmarys/wp-includes/wp-db.php on line 1372

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

    If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

  25. lamollner
    Member
    Posted 10 months ago #

    So here's another update...I was able to install another version of WP and I am now able to login and view the theme I had been using. I can get to the dashboard just fine. Some of the CSS changes I had made are appearing but none of the content (like the page heading, main nav, and sub pages I had created) are showing up. I have a feeling that this information is lost forever but I still have a little hope because of the CSS updates that are showing up currently. Can anyone help me with what kinds of files to look for when trying to retrieve the content changes I had made? I have so many WP sites/folders now from all the work trying to get things working again that it is now really hard for me to figure out which folders are in fact the "important" ones. Thanks in advance for help/advice/ideas...Leslie

  26. 2ninerniner2
    Member
    Posted 10 months ago #

    All content (pages, posts), settings (navs, headings, etc.) are stored in and retrieved from the database; there are no files to look for for these items. The only files that the user adds to a WP site, generally, are in the wp-content folder and in the enclosed themes, plugins and uploads (only if you have uploaded anything) sub folders. Any media (images, videos, etc.) are stored in the wp-content/uploads folder (and any resulting sub folders, depending upon how you set it up).

    If you were now able to get a version of WP running, did you create and use a new database? Sounds as though you did as there is no "previous" content.

    To sum up, generally, each WP install will have the following files and folders:

    Folders:
    - wp-admin
    - wp-content
    - wp-includes

    HTML file:
    - readme

    PHP files:
    - index
    - wp-activate
    - wp-blog-header
    - wp-comments-post
    - wp-config-sample and/or wp-config (depending upon how you set it up)
    - wp-cron
    - wp-links-opml
    - wp-load
    - wp-login
    - wp-mail
    - wp-settings
    - wp-signup
    - wp-trackback
    - xmlrpc

    Text file:
    - license

    Now you can see why it is a good idea to have each site, even if it's only one, in a separate folder in htdocs :-)

    For example, my htdocs folder in MAMP has only these items (folders only):
    - wp351
    - wp36
    - wp382
    - wp39
    - wp391
    - joomla302 ...oops! ...how did that get in there :-)

    The default databases that are in the latest MAMP 3.0.5 are the following system databases; do NOT edit or otherwise mess with these :)
    - information_schema
    - mysql
    - performance_schema

    Generally, you create a new, empty database for every WP site in your MAMP installation.

    How many others do you have now other than the above-mentioned three?

  27. lamollner
    Member
    Posted 10 months ago #

    Thanks for all the info 2ninerniner2.

    I'm looking in my "db" folder in MAMP 3.0.5 and I see the "mysql" and "performance_schema" databases but I don't see the "information_schema" default database that you mentioned should be there. Not sure why this one is missing. Then I have a few other folders that appear to be related to the 2 or 3 new WP installs I've done now in the updated MAMP. Then there are three files that start with "ib" something, not sure what these are for.

    So, when I look in my new WP installed folders, I see a "db.opt" file - is this the main database file? I looked to try and find a db folder in my older version of MAMP and I don't see a file there. I thought if there was a db folder in the old MAMP that this would be where I could find my old database(s).

    This all seems to be leading to the conclusion that I didn't backup my files correctly and now I have to start over from scratch with my CSS and content for the newly updated MAMP site. I am definitely using separate folders in the htdocs folder for each of my WP installs like you mentioned I should. But, I'm thinking all is lost at this point. Unless you have any other thoughts 2ninerniner2 or anyone else...

  28. 2ninerniner2
    Member
    Posted 10 months ago #

    Please re-read my previous post :-)

    There are NO DATABASE FILES you work with directly! One does NOT interact with the db at the file level; it is done completely through the WP interface and phpMyAdmin (when using MAMP).

    So stay away from those db.opt files! :-)

    The ONLY place you interact with the db is via phpMyAdmin, which in MAMP, you access from the MAMP Start Page under Tools (do NOT select the lite version for now), or by http://localhost:8888/phpmyadmin.

    THIS is where you create the new, empty db for WP to use during the installation process. And also the place that I referred to having the 3 existing dbs.

  29. i82rulaa
    Member
    Posted 9 months ago #

    Hi! I had the same problem and I solved changing the Apache and SQL port to 80 and 3306.

    I hope it helps!

  30. rvalee
    Member
    Posted 7 months ago #

    Thanks for all this info. Here's what finally worked for me:

    I just upgraded MAMP and it reset my home directory to the Application/MAMP folder, despite the fact that in the previous install, my home directory is in another folder with web design data on my computer.

Reply »

You must log in to post.

About this Topic