• Resolved danimcnulty

    (@danimcnulty)


    I have followed several people’s instructions on moving my local site to my server, however, I continue to run into this issue:

    “If you’ve inserted something incorrectly in your wp-config.php file or the new server’s MySQL database was not setup properly, you’ll know because you’ll see WordPress’s database connection error.”

    I have a feeling I did something wrong in the MySQL database step as I get the following error message when importing the revised file:
    Error

    SQL query:


    — Database: MolinaroAppraisalServices

    — ——————————————————–

    — Table structure for table wp_commentmeta

    CREATE TABLE wp_commentmeta (
    meta_id bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
    comment_id bigint( 20 ) unsigned NOT NULL DEFAULT ‘0’,
    meta_key varchar( 255 ) DEFAULT NULL ,
    meta_value longtext,
    PRIMARY KEY ( meta_id ) ,
    KEY comment_id ( comment_id ) ,
    KEY meta_key ( meta_key )
    ) ENGINE = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT =1;

    MySQL said: Documentation
    #1050 – Table ‘wp_commentmeta’ already exists

    Can anyone help me? It’s either that or I’m entering the wrong info into my wp-config.php file. Site is http://www.molinaroappraisalservices.com.

    Thanks in advance.

Viewing 15 replies - 1 through 15 (of 19 total)
  • That error leads me to believe that you ran the WP installer on the hosted site before you tried the import; the table is already there from that and now you are attempting to create it again with the SQL import.

    The easiest way to fix this is create a new database on the hosted site (and please use a shorter name! LOL 🙂 … no need for anything that descriptive at this location … just no spaces in the name). Import the SQL file you exported from MAMP into this new database; it should now import with no errors. You can just leave the original one there as-is or delete (drop) it.

    Edit the wp-config.php on the hosted site to reflect this new database’s credentials for DB name, User, Password.

    If you did in fact run the WP install first, then you will have to replace the wp-content folder with the one from your MAMP install, as that is where all your themes, plugins, media, etc. are located.

    Not knowing which instructions you followed, you may have to change the site url and home url in the hosted database after the import. You can verify this by selecting the wp_options table and checking the values for both fields; they should both be:

    http://www.molinaroappraisalservices.com

    After it is all up and running, install and run this plugin to change the URLs of your images, links, etc. from the values in your MAMP install to the new hosted location:

    http://wordpress.org/plugins/velvet-blues-update-urls/

    In your case (assuming your MAMP install is in a folder named wordpress):

    Old Site: http://localhost:8888/wordpress
    New Site: http://www.molinaroappraisalservices.com
    – check all options EXCEPT the last one

    Thread Starter danimcnulty

    (@danimcnulty)

    Thanks so much for your reply! I was able to get through all your steps above until this one: Not knowing which instructions you followed, you may have to change the site url and home url in the hosted database after the import. You can verify this by selecting the wp_options table and checking the values for both fields; they should both be…

    where do I find the wp_options table? It does not show up on the hosted server, and i found a .frm file on my desktop, but when I tried to upload it, I could no longer see the file.

    Thanks for your help, I am going crazy here and running out of time to get this site live.

    The wp_options table is in the database for your site.

    In your hosting control panel there will be a database admin option; a lot of hosts use phpMyAdmin. Use whichever one you have and then select the database for your site. In the list of tables you will see the wp_options table; select it and then edit the two fields mentioned if they are NOT as indicated in the previous post.

    Thread Starter danimcnulty

    (@danimcnulty)

    Hi again,

    I looked there (in my new database that I created), it’s not there. When I tried to upload the one from my desktop, I can see the file on my desktop but filezilla does not see it. Any thoughts?

    thank you!

    Thread Starter danimcnulty

    (@danimcnulty)

    Actually, I take that back – it’s not on the phpMyAdmin for the new database, but I do see it on my computer. It’s in my MAMP/db/mysql/MolinaroAppraisalServices folder. Can I upload that to GoDaddy?

    Can I upload that to GoDaddy?

    NO! Those are the “raw” db files.

    – start MAMP
    – from the MAMP Start Page, select phpMyAdmin
    – select the database to export in the left pane
    – click the Export tab in the right pane
    – Export Method: > Custom > Output: > Save output to a file > leave all other options as is and click “Go” (at the bottom of the page)
    – this will create a file in your Downloads folder named ‘your_database_name.sql’
    – THIS is the file that your IMPORT into your new, empty database at Go Daddy 🙂

    Thread Starter danimcnulty

    (@danimcnulty)

    I really appreciate your patience. That got me to the wp_options table…you said check the value in both fields – I don’t know what I’m looking at. I named this new server “Molinaro” and I see in line 1 of “Browse” the siteurl is http://localhost:888/MolinaroAppraisalServices.”

    I vow never to use WordPress again if I can just get this site uploaded!!!

    In Browse, click the pencil icon to edit that row and enter the URL of your site, which you stated is
    http://www.molinaroappraisalservices.com and then click Go.

    This is what visitors will enter in their browser to get to your site 🙂

    Now find the home field in the table (should be around option_id 36 or so) and do the same thing.

    I vow never to use WordPress again if I can just get this site uploaded!!!

    Well, out of all of the CMS-type web frameworks out there (Joomla!, Drupal, e107, etc.), it’s about the easiest 🙂

    The thing is, once you understand how and why it works the way it does, it is really not that difficult. That’s why it’s good to practice using a local install and just moving the sites around there … same concept.

    Not to “brag”, but I can do this in less than 5 minutes (depending upon how fast Go Daddy gets the database setup):

    – export local db
    – ZIP entire contents of local site
    – create new, empty db on host
    – import exported db file
    – edit the siteurl and home fields in the db
    – upload and unZIP the local site files
    – edit the hosted wp-config.php with the hosted db credentials
    – install and run http://wordpress.org/plugins/velvet-blues-update-urls/
    – done 🙂

    Thread Starter danimcnulty

    (@danimcnulty)

    OK, I figured this out, thank you so much. Now i have everything up and running, however, the site looks nothing like I designed it on MAMP/localhost….more research…thanks again!

    Thread Starter danimcnulty

    (@danimcnulty)

    Since you are the “EXPERT” maybe you can tell me why my website doesn’t have any of the features in my MAMP/localhost site? there was a white box around the center information, the tabs were in a vertical line under the bowl image, there were no skip to fields…something is seriously messed up and I’m not sure how to fix? It’s already correct on my localhost. And seriously, I can’t believe you can do all that in 5 minutes, it’s take me a week and an embarrasing number of hours to just get the darn thing live!

    Thread Starter danimcnulty

    (@danimcnulty)

    I just redid all the steps you listed…this time only took me 15 minutes, but website still looks terrible! Help please.

    – install and run http://wordpress.org/plugins/velvet-blues-update-urls/

    Judging by the View Page Source of your site, you have not done the above-noted step; image links (and other items) are still referencing the local install 🙂

    Old Site: http://localhost:8888/MolinaroAppraisalServices
    New Site: `http://www.molinaroappraisalservices.com’
    – check all options EXCEPT the last one

    Also, for good measure, go to Setting > Permalinks and just click Save Changes to reset your Permalinks.

    Thread Starter danimcnulty

    (@danimcnulty)

    My hero!!! Silly me, I ran the plugin on my local host rather than on the server…Wow, hours of frustration later, the site is live AND how I intended it.

    Thank you, thank you!

    Almost there! 🙂

    In Chrome and IE9, it shows you still have the main image (above the menu bar) pointing to the local site:

    http://localhost:8888/MolinaroAppraisalServices/wp-content/uploads/2013/08/cropped-bowl2.png

    It looks as though it is part of the theme so that’s why it didn’t get changed with that plugin.

    Find where that is located and change the localhost:8888 to www.molinaroappraisalservices.com

    Thread Starter danimcnulty

    (@danimcnulty)

    Hi, you’ll be surprised to hear that I’m confused…I checked the image in wordpress, and it shows the url as: http://www.molinaroappraisalservices.com/wp-content/uploads/2013/08/cropped-bowl2.png

    Am I looking in the right place?

    Thanks.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Trouble moving local MAMP wordpress site to server’ is closed to new replies.