Hosting your media files on the Infinite Uploads cloud can dramatically speed up your development workflow. The big advantage of using Infinite Uploads to host your WordPress media files is the ability to create staging sites without having to copy your media content from production to your development environment.
In this article, I’ll show you how to use Infinite Uploads to improve development when:
- Creating a staging site to work locally or online
- Pushing your staging site back to production
Both circumstances require you to have an entire copy of your production site which in most cases is pretty tedious as you have to copy over all the content from your website. This is where Infinite Uploads can be massively beneficial. To help you understand the benefits, let’s first talk about the delete local content option built-in to Infinite Uploads.
Delete Local Content
The first thing you will need to do to speed up your development and staging sites is to delete local content that is synced to Infinite Uploads.
Once you have your site connected, use the delete local content button to free up space on your hosting servers. Infinite Uploads makes it completely safe to delete your local content with multiple safeguards built-in to protect your files from being lost. There are several reasons why you would want to delete your files from your localhost:
- Reduce your total storage usage on your hosting service
- Improve your hosting performance
- Improve staging and cloning functionality
For development, this will improve the speed and efficiency of staging and cloning of sites.
Getting Your Production Site Ready
So, let’s go to the bottom of your Infinite Uploads configuration on your production site and click Delete on the Free Up Local Storage option
Once your media content is deleted locally, your staging and cloning functionality will be much faster as you are not going to clone all the content from your site – just the WordPress files – making it all much easier to manage.
Note: This will only delete files that have been synced to Infinite Uploads. It always checks against local files to verify none of your files will be lost. Nice, right?
Creating A Staging Site
After you have your site connected to Infinite Uploads and after deleting your local storage content, create your clone/staging site.
For this example, we are using Plesk, but you can use any tool you like. There are no limitations, you can even export your site with plugins such as All in One WP Migration, Migrate Guru, or the tools provided by your hosting service. You can even export the site and create a local copy on your PC. This process will be a lot easier as you will only have to download a small copy of your site (since all the media gallery is going to be stored under your account at Infinite Uploads).
After the clone is completed and you have your staging site, go ahead and log in to the backend
As you can see in the example below, once the staging site is created, you will already see all your media gallery contents in-sync. No further action needs to be done as when you clone the database both sites will preserve the same secret key that allows our service to identify them as one. Remember, this procedure is valid for both online staging and local staging.
With your site cloned and active at Infinite Uploads, you now have a perfect copy of your production environment with minimal effort. And it will save a ton of time because you no longer need to copy over all the images and other media files on your media gallery, which by far takes up the most storage space. Sites with large media libraries that take hours and hours to migrate can be moved in minutes.
Some Things To Take Into Consideration
If you want is to replace your production environment with your staging after the design is complete, nothing is required besides pushing the code files to production. Media files uploaded to your staging site will be automatically available on your production site because the uploads directory is being shared during development.
Regarding the media library, it is worth knowing that Infinite Uploads will not sync the media library database between multiple installs, only the filesystem. So new attachments won’t be shown in your media library if you don’t sync the database back to production, but the image URLs will be present and usable. Because of this, when deleting media attachments, if you delete an attachment on production that exists on staging (or vice versa) the attachment will still show on the other environment but will return a 404 error there if you try to access it.
Finally, If you happen to disconnect one of your sites from Infinite Uploads since both share the same secret key they both will get disconnected at the same time. This is to prevent synchronization issues.
Infinite Uploads can drastically speed up development on sites with large media libraries. Using Infinite Uploads increases productivity in your staging/local environments by saving the need for you to copy over your entire media gallery and keeping both sites in sync. By taking advantage of our delete local storage functionality and by linking both cloned sites to the same id you can dramatically improve your staging/cloning capabilities, working faster, and with less hassle.
If you have any tips or questions about using Infinite Uploads for improving productivity tell us in the comments. I look forward to hearing from you.