Migrate your WordPress site to the Sitehost service

On this page:


Overview

Follow the steps outlined below to migrate your WordPress site to the Sitehost service.

These steps assume you have a WordPress site currently installed on an existing web server. UITS strongly recommends that you update your WordPress site, including themes and plugins, to the latest version before migrating. You should also back up your database before migrating.

1. Move your files to Sitehost

Create a new Sitehost account, and move your WordPress files to Sitehost-test or Sitehost.

2. Update the database user

You likely need to create a new database user for WordPress that allows access from the IP address range used by the Sitehost service (129.79.123.%).

To create a new database user, see Use MySQL Workbench to connect to the Sitehost MySQL servers; connect to your root account (<account name>_root) on either Test (mysql-test.uits.iu.edu) or Production (mysql.uits.iu.edu), and then:

  1. Select your schema (the Schemas tab is in the lower part of the Navigator pane, the left-most column of MySQL Workbench), and then call the createUser API to create your user (the username cannot include the word root):
    CALL api.createUser('SomeNameNotIncludingROOT', '129.79.123.%', 'pwdHere', true or false (pick one), true or false(pick one))
    • The first true or false is for whether you want SSL connections only.
    • The second true or false is for whether you want a password that expires. If this option is selected, new users will be required to update their passwords immediately after their first login. After doing anything, users will then receive an error message instructing them to change their password.
  2. The password must contain at least:
    • Nine characters
    • Two uppercase letters
    • Two lowercase letters
    • Two numbers
    • Two of the following allowed special characters:
        ‘ ~ ! @ # $ % ^ & * ( ) _ - + = { } [ ] / < > , . ; ? ' : | (space)
  3. Call the grant API in order to give your user the permissions needed to make edits to the database:
    CALL api.grant('groupacct_SomeNameNotIncludingROOT', '129.79.123.%','SELECT,INSERT,UPDATE,DELETE,CREATE,DROP','groupAccount_schemaName', '*')

3. Edit the wp-config.php file

You may need to make changes to the wp-config.php file:

  • Update the database username, if different:
      define('DB_USER', 'db_username');
  • Update the database user password, if different:
     define('DB_PASSWORD', 'db_password');

For more about the wp-config.php file, see the WordPress website.

4. Update the site URL

This step is only necessary if you will be accessing the site through a different URL (for example, your old URL was www.iu.edu/~site and your new URL is site.sitehost.iu.edu). There are several different ways to do this; see Changing The Site URL.

You may also need to update internal links in your site if they use the full hostname.