Blog: WordPress
Computer technician

Installing WordPress Without A Domain Name

Avatar for John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his web agency, Lockedown Design & SEO.

When moving an existing WordPress site from one hosting company to another, there are steps you have to consider.

Most migration tools allow you to import a database from the existing install into your new WordPress install on the new server.

The best way is to go with a host like WP Engine, that allows you to set up a staging area, that can be easily ported to the live site.

But let’s say you’re moving an existing website to a host that doesn’t have amenities like staging areas.

You still need to install WordPress on the new server before you import the database from the existing site.

WordPress associates a domain name with each new install. It needs to know what URL to make the main site URL, so it can run the installation.

What if the domain name has to keep pointing at the original site while you set up the new hosting and WordPress installation?

In other words, how do you install WordPress without a domain name?

Installing WordPress When You Can’t Use A Domain Name

The answer is found in the WordPress Codex in the Moving WordPress and Editing wp-config.

You can use the IP address of the new server, with the username of the account for an install URL on most servers. (Check with your hosting to confirm).

You’ll need to define the WP_HOME and WP_SITEURL in the wp-config file found at the root of your new WordPress install.

For an IP of 192.0.2.0 and a username of “username”, these lines would look like this:


define('WP_HOME','http://192.0.2.0/~username');
define('WP_SITEURL','http://192.0.2.0/~username');

These lines would then be added to the wp-config file, right above the line where it says, Stop editing.

What if you need to install WordPress on your hosting as an add-on domain? But the domain name isn’t pointing at the server yet?

In this case, we need to modify our DEFINE statements a bit. This works for most hosting configurations.


define('WP_HOME','http://192.0.2.0/~username/yourdomainname.com');
define('WP_SITEURL','http://192.0.2.0/~username/yourdomainname.com');

You can find more information about the WP_SITEURL on the WordPress Codex.

After this, you should be able to run the regular installation of WordPress on the new server, and proceed with the migration process.

Once you move the database and files over from the existing server, and you’re ready to point the domain name from the old server to the new server, you can delete these lines. You can also change these defined values to the domain name and new site URL.

Before changing which name servers the domain name points towards, I also recommend using a tool like WP Migrate DB Pro to do a find and replace for instances of the IP domain, and replace them with the permanent domain name. This ensures that links to images and files work once the domain name propagates.

Propagation is the time that it takes for all Internet Service Providers (ISPs) to change the nameservers that the domain name is pointing at. This varies by ISP – they all have different lengths of time that they keep the domain name records fresh.

As always, when migrating your original site, make sure you keep multiple copies of your database backups, in case you need to restore the original site.

Avatar for John Locke

John Locke is a SEO consultant from Sacramento, CA. He helps manufacturing businesses rank higher through his web agency, Lockedown Design & SEO.

4 comments on “Installing WordPress Without A Domain Name

  1. I am stuck. I installed Filezilla and it isn’t connecting to my server. To be honest, I’m not sure what I should type in the host or username or password labels.

    It’s confusing and time consuming, I need help in simpler terms. 🙂

  2. Hi Munthaha:

    Your hosting company should be able to help you find where the FTP information is in your hosting account.

    If your hosting uses cPanel, you can create or edit FTP accounts under cPanel Home > Files > FTP Accounts.

    If you are using WP Engine, you can find FTP accounts under Installs > SFTP Users.

    For Bluehost, the FTP information is under Hosting > cPanel > Files > FTP Manager.

    If you use Flywheel for hosting, the SFTP information is under Profile.

    If you are hosting with someone not listed here, contact your host, and they can help you find your FTP information.

  3. Hi John

    Excellent article, however most of it is gibberish to me. See, my employer had bought a domain name in 2004, and never used it. He had bought it using a middle-man company (not existent at this stage, as it was a small time firm) from the hosting service Godaddy.com.

    This having been 13 years ago, and with the initial company having been dissolved, it is impossible from our side to find our login information, payment information, registrar address, the whole caboodle. I presume this is gonna be a decade-long process through GoDaddy.com, however this isn’t my main question.

    My boss has placed upon my shoulders the task of creating our website. From scratch, mind you; because I am the most proficient in the office regarding IT related things.

    At first he wanted to use a free server like Wix, but I had advised against it, as the ‘.wix’ suffix looks rather unprofessional for a 25 year old company.

    In the meantime, while the existing domain login information gets sorted out, I need to be able to use WordPress to create the entire website, then as soon as the domain name is under wraps, I can simply migrate everything to that domain.

    Is this possible? Because the “famous 5 minute install” provided by the WordPress downloadable is, well, I don’t fluently speak robot. It has asked me to open the install.php file in my browser, which in the first place doesn’t allow me to edit the coding whatsoever, and another off-the-starting-block error is the inaccessible domain we have.

    Fact of the matter is, I have no idea what to do, regardless of having a usable domain or not. To quote the internet, could you explain it like I’m five?

    Kindest regards

    1. Hi Lucas:

      There are two ways to go about installing WordPress before you have a permanent domain pointing at the site.

      Method #1:

      The easiest way is to purchase managed WordPress hosting at WP Engine or Flywheel, and click Add a site or Add an install in the Dashboards there.

      These hosts set up temporary domains, which you can use to build the site. When you get the login info for your domain name, you can then point the domain towards the website.

      Method #2

      The do-it-yourself method is to get hosting on a regular host that uses cPanel.

      Download the latest version of WordPress from wordpress.org, and copy the wp-config-sample.php file. Keep the original file. Rename this second wp-config-sample.php file wp-config.php. The wp-config file will have your database login information.

      In particular, you will want to pay attention to the part of wp-config.php that looks like this:

      
      
      // ** MySQL settings - You can get this info from your web host ** //
      /** The name of the database for WordPress */
      define( 'DB_NAME', 'database_name_here' );
      
      /** MySQL database username */
      define( 'DB_USER', 'username_here' );
      
      /** MySQL database password */
      define( 'DB_PASSWORD', 'password_here' );
      
      /** MySQL hostname */
      define( 'DB_HOST', 'localhost' );
      
      
      

      Go into your cPanel and find the icon for MySQL Database Wizard. You will use this to create a database for your site.

      CPanel X: Databases

      The first screen of the Database Wizard will ask you to create a database name. Copy and paste that info into your wp-config file where it says DB_NAME.

      ON the second screen of the Database Wizard, it will ask you to create a user name. Copy and paste this into the wp-config file where it says DB_USER.

      On the next screen, it will ask you to create a strong password for the database. Copy and paste that into wp-config where it says DB_PASSWORD.

      On the last screen, it will ask what privileges you want to give to this user. Check the box that gives the database user All Privileges.

      In wp-config, you can leave DB_HOST as localhost.

      In the main article above, it described some DEFINE statements you would need to add to your wp-config file if you do not have your final domain name pointing at the site.

      You can use the IP address of the new server, with the username of the account for an install URL on most servers. (Check with your hosting to confirm).

      You’ll need to define the WP_HOME and WP_SITEURL in the wp-config file found at the root of your new WordPress install.

      For an IP of 192.0.2.0 and a username of “username”, these lines would look like this:

      
      define('WP_HOME','http://192.0.2.0/~username');
      define('WP_SITEURL','http://192.0.2.0/~username');
      
      

      These lines would then be added to the wp-config file, right above the line where it says, Stop editing.

      Remember to double-check with your particular host and see what their convention is for accessing the site without a domain. This should work on most cPanel configurations.

      You would now upload everything that is inside the directory folder called wordpress on your desktop to the folder on your host where you access the site. This can vary from host to host. Usually it is under the domain name you created the site with, or a folder that is named after the install.

      To install WordPress, you would then go to the temporary domain with the IP address and the tilde symbol. WordPress should redirect you directly to the install screen, if you haven’t already installed it.


      Don’t feel discouraged at the complexity of the Five-Minute Install. Like all things, it takes lots of practice to get it down to five minutes, and getting used to all the steps.

      Like I said before, you can always use WP Engine or Flywheel, and let them install WordPress for you and use the temporary domain to develop the site. When you get your original domain name squared away, you could then point it at the new site.

Join the Conversation

Your email address will be kept private. Required fields marked *.