How to Move a Wordpress Website from Laravel Forge to Webdock
Last updated: November 28th 2024
Introduction
If you run a WordPress site on Laravel Forge, you might face limitations that hinder your website's potential. Issues like the absence of a built-in file manager or increasing monthly fees after the trial period can be frustrating.
Webdock, on the other hand, provides a more flexible and cost-effective solution, particularly for managing WordPress sites. This guide will walk you through migrating your site from Laravel Forge to Webdock, ensuring a smooth transition with minimal downtime.
What Makes Webdock Different From Laravel Forge?
Webdock stands out from Laravel Forge in several key areas. Firstly, while Laravel Forge offers basic versions and even its Business plan lacks essential features, such as a file manager, Webdock provides a more comprehensive experience.
Laravel Forge isn’t specifically designed for WordPress sites, which is a limitation for many users. While Webdock isn’t designed specifically for WordPress either, you will find managing your WordPress website on Webdock much easier than Forge.
In terms of pricing, Laravel Forge gives you a 5-day free trial, but after that, you’ll need to pay for the control panel each month along with your VPS expenses. On the other hand, Webdock includes its control panel at no extra cost for all servers, making it a more budget-friendly option.
Webdock offers numerous free features for plans priced above €/$5.99 that enhance server functionality. For instance, you can take advantage of unlimited transactional emails through Postmark, which is known for its excellent deliverability and enhanced bot protection via BotGuard. While Laravel Forge only provides backups on its highest-tier plan, Webdock automatically takes snapshots of your server for free twice a day. The same goes for monitoring. Forge monitors its most expensive plan, but Webdock gives it for free.
Additionally, Webdock gives you access to ImprovMX Pro at no cost. If you were to purchase these features separately, they would typically add up to over $30 per month.
Overall, Webdock offers equal benefits to all users and provides performance that exceeds industry benchmarks, making it a compelling alternative to Laravel Forge.
Getting Your Website Core Files
First, if you haven't done so already, navigate to your [Server name] > SSH keys and assign a public key to your server. Make sure to give it a friendly name for easy identification.
I won’t cover how to generate SSH keys here, but you can use tools like PuTTY Keygen or find online resources to help you. Just keep your private keys secure and save them on your computer.
Next, open your server’s terminal using your preferred method, logging in with the user ‘forge’ and the private key associated with the public key you just assigned. When prompted for a password, enter your sudo password, which is typically sent to your email during server setup.
Once logged in, run the following command:
$ mysqldump -u forge -p forge > file.sql
If your WordPress site isn't installed on the default forge database, make sure to replace the second 'forge' with the actual name of your database.
When you execute this command, you’ll be prompted to enter a password. You can find this password in the same email that contained your sudo password. If everything goes well, you won’t see any response.
This command will create a backup of your MySQL database and save it in the /home/forge/ folder.
Since Laravel Forge doesn’t include a built-in file manager, you’ll need to connect using SFTP. I won’t go into detail here, but a quick Google search will help you learn how to connect via SFTP using the private key with the ‘forge’ user. I prefer using Termius for this task because it streamlines the process.
Before going forward…
The method I am using typically results in minimal downtime (I'll provide additional tips to help reduce it even further later). However, low downtime doesn’t guarantee that all changes made during the migration will be recorded.
To optimize the process, it's wise to schedule your migration during periods of low traffic. Tools like WP All Import or WP All Export can be beneficial for transferring any new data that might not have been captured in the initial migration.
Another approach is to implement a maintenance plugin, which lets you temporarily pause your live site until the entire transfer to Webdock is complete.
Once you access your website files, you’ll be taken to the home/forge/ folder by default. Here, you’ll find two important items: the database backup and the folder for your website(s).
Copy the database or the DB zip file to your local machine.
Next, open the folder named after your website and copy the 'public' folder to your computer.
After that, compress this folder into a zip file along with the database dump. Depending on your SFTP software, you may have the option to zip the folder first and then transfer it to your machine. If this feature is available, it can save you a lot of time.
Choosing A Webdock Server & Installing WordPress
Go to Webdock and set up a server plan starting at €/$5.99 or higher. You can choose between Apache or NGINX for your server software, and I recommend opting for NGINX.
Once your server is ready, navigate to its dashboard on Webdock. Look for the small pencil icon next to the Alias field in the Overview tab and click on it.
In the main domain column, enter your website's primary domain and click on Set Identity. Typically, you would check the domain before setting the identity, but to reduce downtime, you can directly assign your website’s domain as the primary one.
The setup process should take approximately 3-4 minutes. You may encounter an error message during this time, but feel free to disregard it for now.
After returning to your server's overview page, locate the Manage WordPress section.
You will need to install WP-CLI on your server. Click the button to start the installation process. Once WP-CLI is successfully installed, click the Install WordPress Now button. A form will pop up with fields for admin email, domain, path, database, and more. In most cases, the default settings will suffice.
Please note that you cannot manually create an admin password; Webdock will generate one for you automatically.
Making The Switch
After successfully downloading and saving your database and website files, the next step is to install the File Manager from the overview section and log into it.
Once you're in the File Manager, select all files, but be sure to uncheck the PHPMyAdmin folder and the filemanager.php file to exclude them. After making your selections, proceed to delete the remaining files.
Next, find the upload button located in the top right corner of the File Manager interface and click on it.
You’ll upload the zip file containing the website files that you previously downloaded from your Forge server. You can either drag and drop the file into the upload area or manually select it from your computer. Once the upload is complete, locate the zip folder you just uploaded, click on it, and choose the option to unzip it.
After unzipping, open the newly created folder, navigate to the files section, select all its contents, and click the copy button.
Check the "Move" box in the next window while leaving the path field empty. This will move your files to the main directory.
Finally, you can safely delete both the original zip file and the unzipped folder to keep your directory clean and organized.
Next, open the wp-config.php file and find the section containing your database information.
Update this section with the current details from your server overview.
Once you've made the necessary changes, save the file.
After completing all your file-related tasks, it’s wise to disable and remove the File Manager. While it is password-protected, it could still pose a security risk. You can quickly delete the File Manager using the button in the same area where you initially enabled it.
Now, access phpMyAdmin by clicking the small database icon in the credentials tab.
When prompted, enter your Admin username and password.
Locate your WordPress site's database, select all tables within it, and then proceed to drop (or delete) them.
Next, head over to the import tab. You can drag and drop the .sql or .zip file you downloaded from the Forge server or manually select it from your computer. This SQL file will populate your database with all the necessary information.
Then, find the "wp_options" table and ensure that the siteurl and home option_names are set to the https:// version of your website's URL.
After that, update your domain's DNS settings to point to your Webdock VPS IP address using an A or CNAME record.
As mentioned earlier, return to your server overview, locate the Alias section, and click the check domain button. If everything checks out in the validation section, set the domain.
This will also trigger the regeneration of your site's SSL certificates. Your WordPress website is now live on Webdock after migrating from Forge with minimal downtime.
Alternative Method: Using A Backup Plugin
Choosing the method we talked about earlier is usually straightforward and reliable. However, if your website is large, your internet connection is slow, or you're not tech-savvy, it can become tricky. In those cases, a backup plugin could help ease moving your site to Webdock.
When considering backup and migration tools, I often recommend UpdraftPlus. It has a few minor issues but effectively gets the job done. The best part is that most of its key features come at no cost, so you won’t have to spend any money. Another good option is Duplicator.
If you already have a backup plugin you trust, stick with it. The general process is similar across various plugins; having some cloud storage access can be handy.
You can use any cloud storage service, including the accessible version of Google Drive. While it isn’t strictly necessary, cloud storage can speed up migration. If you’d instead not use a storage service, that would be no problem. I’ll guide you through the steps without one. Just remember, if your internet is slow, doing this without cloud storage might take almost as long as doing it manually.
To get started, log into your WordPress dashboard. Head to the “Plugins” section and click “Add New.” In the search bar, type “UpdraftPlus” to find the UpdraftPlus WordPress Backup Plugin. Click “Install Now,” once it’s installed, activate the plugin.
After activation, you can take a quick tour of the plugin or skip it if you don't plan to use it extensively or if it doesn’t fit your needs.
Next, click the UpdraftPlus option in the menu to access its settings. Scroll to the “Choose your remote storage” section, select your preferred cloud storage option, and follow the setup instructions. If you decide against using remote storage, simply move past that step.
Once you've completed the setup, head to the Backup/Restore tab, click on the “Backup Now” button that stands out, make sure all the checkboxes are selected, and then click “Backup Now” again to initiate the backup of your site.
Allow some time for the backup process to complete. If you choose not to use remote storage, scroll down to find your newly created backup. Click on each backup component to download the zip files and store them securely.
Next, select a server plan that costs at least €/$5.99 or more. Adjust your profile settings accordingly and deploy your server on Webdock.
You have a couple of ways to move forward: You can either connect your domain directly to your server’s IP address right away, which is simple but may lead to users encountering an empty website initially. Alternatively, you can modify your computer's host file; I’ll explain how to do this in a moment.
In the server identity tab, set up your domain after confirming that DNS has propagated correctly. Then, follow the earlier steps to install WordPress.
Once WordPress is installed, log into your dashboard and install UpdraftPlus or any other backup plugin you prefer. Reconnect with your chosen storage solution.
Go back to the Backup/Restore section. In the "Existing Backups" area, if you see a notification that no backups have been created yet, just click the Rescan Remote Storage button. UpdraftPlus will then check for any available backups and display them for you.
If you're not using remote storage, you can upload your backup files manually. Just choose the upload option and drag your files into the designated area instead of seeing a notification about no existing backups.
Once your backup from the Laravel Forge site appears, that notification will disappear. Click on the Restore button to start the restoration process.
Please ensure that you select all options under Choose the Components to Restore and click Next. The plugin will automatically download the required files if you're using remote storage.
After downloading all files, click Next again and wait for the process to complete. And that’s it! Your WordPress site has now been successfully transferred from Laravel Forge to Webdock. Take a moment to review everything to ensure it’s functioning as expected.
Switching Without Displaying a "Blank Page"
To avoid having your site appear blank during the migration process, consider adding a maintenance plugin to your WordPress site on Webdock. This will inform your visitors that the site is currently under maintenance. The WordPress plugin repository offers several free options.
If you feel comfortable with technical tasks, another option is to wait until the migration is fully complete before changing any DNS records.
When you set your domain as the server identity, simply type your domain directly instead of clicking the Check Domains button. You might encounter an error message, but that’s okay; you can proceed.
Next, locate your server’s IP address in your Webdock dashboard and then open your computer’s host file:
- On Windows: Find Notepad, right-click on it, and select “Run as Administrator.” Then press CTRL + O to open the file and navigate to c:\Windows\System32\Drivers\etc\hosts.
- On Mac: Open Terminal and type sudo nano /private/etc/hosts (for older Macs) or sudo nano /etc/hosts (for newer models).
- On Linux: Launch a terminal and enter sudo nano /etc/hosts, then hit Enter and log in.
Once the host file opens, scroll to the bottom and add your Webdock server’s IP address.
Make sure to add a space after the IP address and list both the www and non-www versions of your domain on separate lines like this:
123.456.789 example.com
123.456.789 www.example.com
After saving your changes in the host file, exit the editor. You may need to clear your DNS cache to help your computer recognize your domain with the Webdock server more quickly.
Here’s how to do that:
- For Windows: Open Command Prompt as an administrator and type ipconfig /flushdns.
- For Mac: Open Terminal and enter sudo dscacheutil -flushcache.
- For Linux: Open Terminal and type systemd-resolve --flush-caches.
Now, you can proceed with installing WordPress using Webdock’s WordPress manager. If you visit your website's URL now, you should see a blank WordPress site—this will only be visible from your computer. Follow the earlier steps to migrate your site.
Once you’ve verified that everything is working correctly, don’t forget to update your DNS records once everything is set up. Click on Set Identity again to generate a new SSL certificate, remove any recent entries from your host file, and clear your computer’s DNS cache again.
Conclusion
Moving your WordPress site from Laravel Forge to Webdock opens up a more streamlined hosting experience with built-in tools to simplify WordPress management. The migration process requires attention to detail, but following the manual method or a backup plugin ensures your site transitions smoothly.
Whether you opted for the direct file transfer approach or use UpdraftPlus, your WordPress site should now run efficiently on Webdock's infrastructure. To make the most of your new hosting environment, verify all site functionality, remove any temporary migration tools, and familiarize yourself with Webdock's built-in features.
Meet Aayush, a WordPress website designer with almost a decade of experience who crafts visually appealing websites and has a knack for writing engaging technology blogs. In his spare time, he enjoys illuminating the minds around him.
Related articles
-
How to Move a Wordpress Website from Cyberpanel to Webdock
A step-by-step guide to migrate your Wordpress site from Cyberpanel to Webdock
Last updated: November 28th 2024
-
How to Move A Wordpress Site From Plesk to Webdock
Step-by-step instructions to move your Wordpress site from Plesk to Webdock
Last updated: November 28th 2024
-
How to Move a Wordpress Website from DirectAdmin to Webdock
Step-by-step instructions to migrate your Wordpress site from DirectAdmin to Webdock
Last updated: November 28th 2024
-
How to Move A Wordpress Website from SpinupWP to Webdock
Step-by-step instructions to move your Wordpress site managed by SpinupWP to Webdock
Last updated: November 28th 2024
-
How to Move A Wordpress Website From Ploi to Webdock
Step-by-step guide to move a Wordpress site from Ploi to Webdock
Last updated: November 28th 2024
-
How to Move a Wordpress Website from Gridpane to Webdock
Step-by-step instructions to move your WP site from Gridpane to Webdock
Last updated: November 28th 2024
-
How to Move A Wordpress Website from Serverpilot to Webdock
Step-by-step instructions to move your WP site from ServerPilot to Webdock
Last updated: November 28th 2024
-
How to Move A Wordpress Website From Runcloud to Webdock
Step-by-step instructions to move your WP site from Runcloud to Webdock
Last updated: November 28th 2024
-
How to Move A Wordpress Website from cPanel to Webdock
Step-by-step instructions to move your WP site from cPanel to Webdock
Last updated: December 1st 2024