WordPress.org

Ready to get started?Download WordPress

Forums

MAMP/Wordpress installation seems to be divided - WP ok but DB empty (11 posts)

  1. eleanorb
    Member
    Posted 1 year ago #

    I am trying to create a development version of my WordPress site on my Mac (10.6.8) using MAMP 2.0.5. I've done everything (I think) that various (!) instructions say, including importing an SQL dump of my database, altering the internal urls, moving my plugin and theme folders to the downloaded WordPress files, and then clicking the WordPress install button, but when I log in and look at my database (URL localhost:8888/wp-admin/edit.php), I see all my themes and plugins, but an empty database! The wordpress files are located on my local Mac at /Users/eleanor/Sites/wordpress and the database ("OWNlocal") seems to be in /Applications/MAMP/db/mysql/OWNlocal -- is this the way it's supposed to be? If so, how can I get WordPress and OWNlocal "on the same page"?

  2. s_ha_dum
    Member
    Posted 1 year ago #

    You can't see your database by looking at an URL. MAMP comes with PhpMyAdmin. Use that to look at your database. That is the same tool you used to import your SQL dump, right?

  3. eleanorb
    Member
    Posted 1 year ago #

    Yes, when I go to PhpMyAdmin, the database OWNlocal is shown to have 11 tables, but when I go to the WordPress Dashboard, it says I have only 1 sample page and 1 sample post! That is exactly my problem -- the two sources of information seem to be accessing different databases.

  4. s_ha_dum
    Member
    Posted 1 year ago #

    What is the database (DB_NAME, but check DB_HOST too) in wp-config.php?

    Eleven tables is about right.

    I am a bit confused by what you are doing. It seems like maybe you are counting tables and expecting them to match up to post count, or something. It doesn't work that way. All of your posts posts will be in the single wp_posts table.

  5. eleanorb
    Member
    Posted 1 year ago #

    define('DB_NAME', 'OWNlocal');
    define('DB_HOST', 'localhost');

  6. eleanorb
    Member
    Posted 1 year ago #

    Sorry, I missed your second questions. Wait for next post...

  7. eleanorb
    Member
    Posted 1 year ago #

    I was assuming that if it showed 11 tables, then these must have come from my import from the live database. However, there is an anomaly -- after importing, the tables appeared as own_posts, own_options, etc., but now there are also 11 tables named wp_posts, wp_options, etc. I think these appeared after I ran the WP install routine, but I'm not sure. The own_posts table was populated (>3000 records), but the wp_posts table was empty. So, just now, I deleted the wp_x tables (which resulted in deletion of "the database"), then imported it again (own_x version). Now in Phpmyadmin, I again have just the own_ versions, populated. When I now go to localhost:8888, I am presented with the WP install page again. I am reluctant to reenter info here and rerun the install without further thought -- what do you think is happening? (I really appreciate your willingness to engage on my issue!)

  8. s_ha_dum
    Member
    Posted 1 year ago #

    Don't run the install, just edit, or create, a wp-config.php to match your local environment. It should be virtually identical to your online wp-config.php but with different DB_* values. Make sure that $table_prefix matches your table prefix.

  9. eleanorb
    Member
    Posted 1 year ago #

    Okay! The $table_prefix was the missing link, I think! No instructions (and I read a lot) mentioned that as a possible change needed. Thanks so much! Eleanor

  10. eleanorb
    Member
    Posted 1 year ago #

    Another problem: Now I can see the front page of my test website by going to localhost:8888, and the internal links (from menu, for instance) look correct: where they are olderwomensnetwork.org/about in the online version, here it is localhost:8888/about, BUT that link gets a 404 ("The requested URL /about was not found on this server."). I must be missing another piece?

    One more thing, in case it's important. The admin name and password required seem to be the same as the online version (though I entered root/root in the test copy of wp-config.php).

  11. s_ha_dum
    Member
    Posted 1 year ago #

    I must be missing another piece?

    Try resetting your permalinks from wp-admin->Settings->Permalinks

    If that doesn't do it you have a mod_rewrite problem-- it isn't enabled or AllowOverride is wrong. I don't what the defaults the are for MAMP.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags