WordPress.org

Ready to get started?Download WordPress

Forums

Installing Existing Website Locally on a different pc (3 posts)

  1. ciaran.lehane
    Member
    Posted 2 months ago #

    Hi There,

    I have recently been asked to work on the upkeep of my company's website and I am having trouble installing the website locally on my Mac.I have downloaded and installed MAMP. I have created a database in myphpdmin called 'wordpress_db'.

    I have been given the downloaded wordpress website 'wordpress123' as a zip file and I have inserted this the htdocs folder in MAMP.

    In my wp-config.php file I have:
    define('DB_NAME', 'wordpress_db');
    define('DB_USER', 'root');
    define('DB_PASSWORD', 'root');
    define('DB_HOST', 'localhost');

    In MAMP I have the following settings:
    Apache Port: 8888
    MySqlPort: 8889

    Document Root: Macintosh:Applications:MAMP:htdocs:wordpress123

    When I go to 'Localhost:8888' in my browser i receive the following error:
    "Error establishing a database connection"

    I have looked up tutorials online but I cannot seem to get this to work. Please can you advise on any known issues in relation to why this is occurring?

    Thank you,
    Ciaran

  2. Jimmy Smutek
    Member
    Posted 2 months ago #

    Hey Ciaran -

    I'm guessing you also have the database for the site you're trying to install on the new computer? It should end with the file extension .sql

    (This info below assumes that you have access to the database file.)

    Try setting up a fresh WordPress install in your MAMP environment. Don't fiddle with the wp-config file at all.

    Once your completely fresh site is up and running go to MAMP's start page, open phpMyAdmin, locate the database for your fresh install, and drop all of the tables.

    To do this, locate the database name in the left hand column, click it once. The main panel should now show all of the tables in the database. Click the "check all" button below the list of tables, and select "drop" in the drop down.

    Once you've dropped all of the tables click on the import tab and import the sql file from the other website. Click go.

    After you've done that copy the contents of wp-content (themes, plugins, and media folders) from the other site into your fresh install's wp-content folder. You can just over write the stuff in the fresh themes wp-content folder - the goal here is to make sure you have the correct assets in place.

    Once you've done that refresh your browser and you should be good to go. Login to wp-admin, flush your permalinks, and if you have any broken image paths use http://wordpress.org/plugins/velvet-blues-update-urls/ to fix your paths.

    Hope that helps.

  3. ciaran.lehane
    Member
    Posted 2 months ago #

    Hi Jimmy,

    Thanks for your rapid response! I do not believe that I have received access to the database and from your response it looks like this is essential to run the website! Is there any way to open up this website locally on a new database for the time being?

Reply

You must log in to post.

About this Topic