Can I build a website before purchasing web hosting?

What are the benefits of using localhost? Having a staging set up on your own computer is very beneficial for testing. The reality is that it’s best to perform updates to WordPress core files and plugins and themes in a staging environment so as not to risk crashing your live site in the event that an update breaks your set up. It’s a great place to try out new design ideas for your website without the risk of visitors seeing your changes before you have them perfected.
"

Read more

The short answer is yes, you can build a website before having web hosting in place.

It comes with a caveat though—you’ll need either some nerd experience or some courage to try something different from what you’re used to with WordPress.

 

There are some great tools out there to help you experiment with building a WordPress website and use it as a playground before you release it to the public. Most though involve purchasing a web hosting account and creating what’s known as a staging site. Many web hosts offer this functionality as part of your web hosting package. But what if you’re a new business on a limited budget and you’re not yet ready to shell out for a web hosting account? There is another alternative. It’s referred to as localhost.

 

What is localhost and how does it work?

Instead of purchasing your webhosting immediately, you can set up something called localhost. This is when you set up some applications on your own computer to emulate the web host environment. We discussed this briefly in another article called Creating a Development Site on a Subdomain. The process is similar to setting up on a subdomain with the exception of the fact that you’re creating the environment on your own computer instead of on the internet where everyone can access it.

The process:

  • download and install the app (MAMP or WAMP, depending on your operating system)
  • set up the environment
    install WordPress core files
  • install necessary plugins
  • begin designing your website on your local host staging environment
  • purchase hosting
  • export a copy of your completed site from your staging environment on localhost
  • import the copy to your new web hosting set up

What does MAMP do?

Essentially, the MAMP application allows you to set up servers and databases which are required by WordPress in order to run. MAMP is the version of files for use on a MAC computer and there’s another version for Windows called WAMP.
After you’ve run the MAMP application and set up the admin options, you’re able to start or turn on the MAMP servers and create a database. After that, you’ll also install the WordPress files (in a way that you may not be familiar with which ISN’T the one-click-five-minute-install version: you’ll have to download, unzip and install files into the correct directory.) There’s a bit of information about that in the WordPress Codex here.

Once you’ve installed the MAMP files and have it running, you can then install the WordPress Core files and you’re up and running, ready to create your website in your staging environment on your computer. At this point, working with WordPress will feel very familiar and you’ll be able to begin building your site. You’ll need to export a copy of your site once you’re done building and may want to consider a plugin such as WP All in One Migration and then import it into your live domain on your new web host using the same plugin. (Instructions for that are found in step three and four of our tutorial here. )

What are the benefits of using localhost?

Having a staging set up on your own computer is very beneficial for testing. The reality is that it’s best to perform updates to WordPress core files and plugins and themes in a staging environment so as not to risk crashing your live site in the event that an update breaks your set up. It’s a great place to try out new design ideas for your website without the risk of visitors seeing your changes before you have them perfected.

Another benefit is that you don’t need an internet connection to work on your staging site design. The MAMP set up emulates the internet connection to the databases so you’re able to work offline on your staging site project.

Lastly, with localhost, no one can access your site except for you—ideal in situations where you may have proprietary information that needs to be concealed from the world until the exact moment you want to bring it to the public. Or perhaps you’re not confident in your design skills, or maybe you like to break things down so you can practice fixing them. These scenarios are a perfect fit for using the localhost environment.

 

Are there any drawbacks to using localhost?

From time to time, you may find that your localhost set up isn’t exactly true to the real life settings of your webhost. Things may not match exactly to the settings on your web host. For example, a plugin may run perfectly fine in your localhost setup, but you may find in the live settings of your web hosting setup that the same plugin causes conflicts. This could be due to PHP settings differing between your localhost setup and your web host setup, among other things.

Using your MAMP setup with no internet connection may produce some odd results because frequently, many themes use fonts from Google which won’t load if there’s no internet connection. Again, there is a way to work around that which would require you to download the fonts directly into your localhost files, but that’s a subject for another article or a good old fashioned google search for the term “How to host Google Fonts Locally.
There’s a great article and instructions here: https://onlinemediamasters.com/load-google-fonts-locally-wordpress/ and as they point out, this is also going to benefit your website load times when you take your site live and export it to your web hosting account.

One other notable drawback you may find is that your computer doesn’t have enough memory to run some of the programs for popular theme builders. Some themes for WordPress have bundled numerous functions into their theme and can be hogs when it comes to memory resources. Because of this, you may find that some themes don’t run properly in a localhost environment if you don’t have enough memory resources available on your computer .

Conclusion

Having a localhost setup on your computer is a great way to test updates and new design ideas. For some people, it may be more hassle than it’s worth though because localhost doesn’t always behave exactly as a web host environment so you still may get unexpected results.

If you’re easily frustrated by the possibility of things not working or having to troubleshoot, you might not want to approach the localhost setup for your staging environment. If you’re a bit nerdy and like to learn new things, a localhost setup on your own computer might be for you. It’s a great opportunity for you to be able to look under the hood and learn more about the file structure of WordPress as well as create a secure environment for all your WordPress updates, design experiments and testing.

We receive no compensation and we are not affiliates to any of the web hosting companies or plugins mentioned in this tutorial. We simply like to share our experiences when products work well and help us complete our tasks effectively.
Hope you found this tutorial helpful! If you need more assistance, reach out to us. We’re happy to help!