Copying your WordPress development websites just got a whole lot easier. The newest version of DesktopServer 3.2.4 was released last night. This version brings a new, important ‘copy feature’ along with various bug fixes and speed improvements. While the blueprints feature is still nice for trying out beta versions of WordPress, the ‘copy feature’ demands immediate attention! Click on the thumbnails for a clear view.
First, you will notice that the third menu item for removing website definitions has been amended to include “…copy an existing development site”. Great news for both the free and premium versions of DesktopServer as this new feature is present in both. Selecting this option and clicking next will present you with the usual list of existing websites.
Below the list of websites you will find two new options: Copy website and Remove website. The default is to copy a website to reduce the chances of accidentally removing your existing project. You will need to select a website from the list to proceed. In our example, we’ve already created the www.example.dev website and we are now going to make a copy. The button to proceed will also change to either ‘Copy’ or ‘Remove’ to define the action you will take. As always, you will still be prompted to confirm if you want to remove a site. In contrast, copying will ask you for a new domain name and site root folder to store your website copy. The suggested domain name will append ‘-copy’ to your original, but you can type a different domain name for your copy.
Clicking next will take you to an additional screen for advanced scrubbing options. In most cases you can just click ‘Copy’ to start the copy process. DesktopServer will copy all files including your .htaccess, so in most cases you will not have to re-save your permalink settings. All of your MySQL data will be copied too, including your original website’s usernames and passwords.
About the Scrubbing Process
Scrubbing is the act of analyzing your website files and the MySQL database for references to your original website’s domain name. During the process of creating your development website, you may have made references to your domain name (i.e. www.example.dev). These references might exist inside the edits you have made to the PHP files that make up your site’s template, or within the body of content that make up your posts and pages. Scrubbing will replace these old references with new references to the URL of your website copy. A typical WordPress developer would limit such references to the files inside the wp-contents folder, and leave all other files (aka WordPress ‘core’ files) untouched. A WordPress pro wouldn’t even reference the domain name at all, but instead use WordPress template tags or isolate such references to only be inside database post content.
Unfortunately, it is not an easy task to update references inside the MySQL database as data is usually formatted (serialized) in a way that a traditional search and replace would break the database. Even dumping the data to a text file and reimporting the data after a search and replace would prove unsuccessful. This is because WordPress, plugins, and themes may store data in formats that would become corrupted when edited by hand. DesktopServer takes a more advanced approach by scanning files and all of your database tables (even ones that third party plugins create) to correct for these issues. To accelerate the process, DesktopServer gives you additional options to omit tables and files that don’t need to be scrubbed. The default will list the database tables and common files and folders to omit. In most cases, you can just accept the defaults and click ‘Copy’.
Lastly, you should check your new website copy for any errors. The copy process will try it’s best to accommodate various themes and plugins but may not be perfect. In most cases, you can simply deactivate and reactivate plugins or re-save your permalink settings. As with any website, it is a good idea to test thoroughly to avoid surprises.
DesktopServer takes a more advanced approach by scanning files and all of your database tables (even ones that third party plugins create) to correct for these issues.
The DesktopServer’s new ‘copy website’ feature is a powerful addition that can help you shave off hours of design and development time. The copy feature copies everything: content, posts, pages, plugins, themes, and their configurations. Coupled with the unlimited number of websites that you can create with the premium version of DesktopServer, the copy feature is perfect for automating your professional WordPress website development needs.
As the Founder of ServerPress, LLC and the Coding Genius behind DesktopServer, Stephen J. Carnam continues to invent new ways to improve developer Workflow through technology. As a huge Advocate of Open Source Software, he promotes Creativity, Community and Collaboration.