• Hi there and thanks for reading my post!

    I have recently moved a website from one domain name and webhosting company to a different domain name with a different webhosting company.

    How I have gone about this is as follows:

    1) Logged in to the site I want to move and go to Settings > General, then change the URLs. (ie from https://example.com/ to https://example.net )
    2) Download my existing site files.
    3) Export the database.
    4) Edit wp-config.php with the new server’s mySQL database name, user and password.
    5) Upload the files to the new webhosting company via FTP.
    6) Import the database on the new server.

    This is following the instructions here (https://codex.www.ads-software.com/Moving_WordPress#Moving_WordPress_to_a_New_Server) however now when I click on the new domain it is showing Error Establishing a Database Connection.
    I have thoroughly checked the DB Name, User, PW and host and they are all correct so I am not sure what to try next.

    Any help will be greatly appreciated!

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator t-p

    (@t-p)

    If you know how to access phpMyAdmin on your host, then double check the wp_options Table (Note: The table prefix of wp_ may be different if you changed it when installing), and make sure siteurl field and home field are correct.

    – If everything looks okay, then have talk with your hosting provider.

    Thread Starter jakezyo

    (@jakezyo)

    Hi Tara,
    Thanks for your reply.
    Yes both the siteurl and home fields are correct.

    Check your .htaccess

    Thread Starter jakezyo

    (@jakezyo)

    How should I check it and what should I be looking for? Thanks for your reply.

    Edit : got it in text editor – it says

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    Definitely a DB issue. Do you have access to the old site still? I migrate using WP Migrate DB and never have any issues.

    https://www.ads-software.com/plugins/wp-migrate-db/

    after migrated.

    – FTP site to new server
    – create new database on the new server with same creds
    – import migrated DB
    – Check config and go.

    Thread Starter jakezyo

    (@jakezyo)

    Ok will try this.

    To clarify, I create a fresh wordpress plugin on new site, import the migrated db in the phpadmin. Then simply upload all the existing site’s files to the new site via ftp (overwriting the files from the fresh WP install on the new site) and change the wp-config to the new database that was created?

    Install the migrate plugin on the old site and run the migration. Then upload the old site to the new server (yes overwriting the install). Then create the new data base with the same credentials as the old and import the migrated DB using phpmyadmin.

    Thread Starter jakezyo

    (@jakezyo)

    Hi, most of this seems to work OK. however, the main URL is coming up with the “Future home of something quite cool” splash page. If I for example use /about on the end of the URL, I can get to the page, same with the wp-admin page.
    Any idea how to get rid of the splash page from coming up? I do not have an index.php on my root folder if that has anything to do with it?
    Thanks!

    Moderator t-p

    (@t-p)

    Check if there is index.him or index.html file in the root directory.

    Thread Starter jakezyo

    (@jakezyo)

    There isn’t it’s just the folders to the wordpress website in the root directory.

    Thread Starter jakezyo

    (@jakezyo)

    Any ideas? Thanks!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Hi! I have a Database Connection Issue’ is closed to new replies.