Help Docs Control Panel Guides Nexcess Control Panel Nexcess Managed WooCommerce Nexcess Managed WooCommerce Store Management Moving WordPress local development to your server

Moving WordPress local development to your server

Transferring code from localhost to a live website is similar to migrating a website from one server to another. Move WordPress local development to Nexcess hosting using this guide.

Overview

WordPress local development can be referred to as the process of building a website locally as opposed to working in the server environment. WordPress local development requires you to set up an infrastructure on the localhost that will allow you to build, view, and manage your website without having to set up DNS or request server resources from a hosting provider.

Developing a website on localhost requires you to have the application stack used by WordPress to be set up in the local environment. Most Content Management Systems (CMSs) and other web applications use an application stack that includes PHP, a web server, and a database server. For example, Apache and NGINX as web servers and MariaDB/MySQL database servers are often used for WordPress in both the development and production environments.

WordPress local development platforms

Quite a few modern WordPress local development platforms simplify the process of building a website on the localhost. In addition, most platforms that can be used for WordPress, including XAMPP and Laragon, are usually cross-platform, which means that you can set up a local development environment on any operating system.

Here are the three most popular WordPress local development platforms:

  • XAMPP. WordPress Local Development with XAMPP is available to Windows, Linux, and MacOS users and provides Apache, MariaDB, PHP, and Perl on localhost.
  • Valet. Local WordPress Development with Valet was presented to MacOS users by Laravel as an environment for PHP frameworks.
  • Laragon. Laragon is a great development environment for building a WordPress website on localhost for Windows users.

Moving from WordPress local development environment to Managed WordPress hosting at Nexcess

There are two main ways to transfer your WordPress localhost website to Managed WordPress hosting at Nexcess — using a WordPress migration plugin or moving your website manually.

Using a WordPress migration plugin

WordPress migration plugins simplify the migration process and can be used for both server-to-server migrations and moving a website from a WordPress local development environment.

The Migrate to Liquid Web & Nexcess is the best plugin for transferring your WordPress website to Nexcess-managed WordPress hosting. The plugin takes care of all aspects of the migration process, from transferring day to making the necessary changes to your WordPress website’s configuration.

  1. Install and activate the Migrate To Liquid Web & Nexcess plugin from your WordPress dashboard in the WordPress local development environment. Upon activation, a link to its interface will appear in the main vertical menu of your admin dashboard.
  2. Open the plugin’s interface from the WordPress dashboard.

You must provide the following information:

  • Your Email Address. The migration plugin will send you automatic updates on your migration status from the WordPress local development environment and notify you once your website data has been transferred to Nexcess.
  • Destination Site URL. The destination URL is the temporary domain name provided by Nexcess.
  • Host/Server Address. You can use either the newly created Nexcess site’s IP address or the temporary domain name.
  • FTP Type. Choose whether you want to transfer the WordPress localhost website to Nexcess via FTPS or SFTP.
  • FTP Username. Your FTPS/SFTP username.
  • FTP Password. Your FTPS/SFTP password.
  1. Provide your email address, confirm that you agree with the plugin’s terms and conditions, and then click the Migrate button.
  2. Provide the destination website address and FTP/SFTP credentials of your newly created WordPress website at Nexcess. In most cases, you will not need to do anything else. However, if you have any additional folders created, include them under the Add Folders section.
  3. Click on the Migrate button to start the migration process once you have completed the form:
  4. Depending on the size of your WordPress localhost website, the migration to Nexcess can take from a few minutes to a few hours. You will receive an email via the email address you provided once the migration has completed:

The Migrate to Liquid Web & Nexcess plugin will take care of all configuration changes and other technical aspects, so after your website has been moved from the WordPress local development environment, you do not need to perform any port-migration cleanup operations.

Browse your website from Nexcess using the temporary domain name assigned to it to ensure everything works as intended and no functionality is lost.

Migrating a WordPress localhost website manually

The Nexcess migration plugin is the best option for moving your website from the WordPress local development environment to Nexcess-managed WordPress hosting. If you choose self-migration, you must adjust all configuration settings and perform post-migration cleanup operations manually after transferring all website files to the new hosting environment.

Follow the provided steps to migrate your WordPress localhost website to Nexcess hosting manually. This process will require you to connect to Nexcess from your local development environment to transfer website files and your website database.

  1. The first step is to back up your WordPress website, including its wp-content folder contents and database. You can create a backup of your WordPress database by using phpMyAdmin. Next, save the newly created database backup in your WordPress localhost installation directory.

As Nexcess creates a WordPress installation once you set up a WordPress hosting plan, the WordPress content folder’s files are typically the only thing you need to transfer from the website files residing on your local machine. Review your website content to see if you need to transfer any additional files or directories.

  1. Upload your WordPress website to the new server

The best way to transfer your website files from the WordPress local development environment is to connect to Nexcess from your local machine via SFTP or FTPS using the credentials you have obtained from the Site Dashboard.

  1. Open the document root of your newly created WordPress installation at Nexcess, like shown below. The path to it will be /chroot/home/username/temporary-domain/html where the username is the account username of your website at Nexcess and temporary-domain is the nxcli domain name assigned to it. As a WordPress installation already exists on the Nexcess server for your website, you can only move the files and folders unique to your WordPress localhost website.

Please note that the WordPress installation at Nexcess will have the mu-plugins folder and some other files required for the correct functioning of the website with regards to the wp-content directory. You will not be able to replace the WordPress content folder entirely:

Please note that the WordPress installation at Nexcess will have the mu-plugins folder and some other files required for the correct functioning of the website with regards to the wp-content directory. You will not be able to replace the WordPress content folder entirely.
  1. You can upload your database backup to the installation directory at Nexcess to restore it using the command line interface or phpMyAdmin from the Nexcess Client Portal.
  1. Adjust website configuration.

Once your website has been imported, you need to adjust the URLs in your WordPress database to reflect the new domain name and no longer reference WordPress localhost. You can perform a search-replace using WP CLI or install a plugin like Better Search Replace for this purpose. Then, finally, save your permalinks structure and flush cache.

Browse your WordPress website using the temporary domain name to ensure everything is working correctly — and nothing has been missed during the migration process. Once you are ready to go live, create a DNS zone for your registered domain name you, update the DNS records to point to Nexcess, and modify your website’s domain name from the Client Portal.

Conclusion

Building a website in the WordPress local development environment can help you reduce costs and ensure security. Moving from the localhost to the production environment can be difficult, but using a WordPress migration plugin automates the process and takes care of all technical aspects of making your website available to the public. The Migrate to Liquid Web & Nexcess plugin is the best migration tool for transferring WordPress from both another web hosting provider and the WordPress local development environment.

Was this article helpful?