Plesk’s built-in Website Copying feature does not offer a “change all” or bulk search-and-replace function during the copying process. It simply transfers the existing files from source to destination, so any references to the old domain name within your site’s files (like configuration, HTML, CSS, or scripts) remain unchanged unless your site uses environment variables or dynamic domain assignment.
To perform a domain name change in all areas of the files:
- You must first copy the files using Plesk.
- After copying, use a bulk search-and-replace utility outside of Plesk (such as SSH command-line tools like
sedfor Linux,findstrfor Windows, or specialized batch editors) to replace old domain references with the new domain throughout all relevant files. - For WordPress sites, the WordPress Toolkit handles search-and-replace during domain or URL changes as part of the cloning process (via WP Toolkit utilities), updating both files and database references automatically.
Summary:
There is no automatic file content substitution in Plesk’s Website Copying tool—manual or external batch tools are needed for bulk “domain name” changes in code and settings after the copy. WordPress Toolkit has built-in routines if cloning a WordPress site.Plesk does not offer a built-in feature to perform a bulk search-and-replace for domain names across all website files during the copy process. When you use the Website Copying tool, it transfers files as-is, so any references to the old domain name in configuration files, HTML, scripts, or other content remain unchanged.
To accomplish a domain name change throughout all areas, you must:
- Copy files using Plesk’s Website Copying tool.
- Afterwards, use an external bulk search-and-replace utility (such as
sedon Linux or a mass file editor) to update domain references in all files.
For WordPress, Plesk’s WP Toolkit does handle domain changes and can update URLs in both files and the database automatically during a clone or migration.
In summary, Plesk itself does not update domain names in file contents during copy—you must handle bulk changes externally unless using WordPress Toolkit for WordPress sites
Bulk domain name replacement in website files during copying is not natively supported by Plesk’s copy feature, but can be accomplished with command-line or external tools after file transfer. Some automation and scripting options, as well as best practices, are outlined below.
Bulk Domain Name Replacement Process
- Plesk does not have built-in options to perform search-and-replace in file contents while copying a site.
- After copying files, use command-line tools (such as
findandsedon Linux) for recursive replacement:- Example:
find /path/to/copied/site -type f -name "*.php" -exec sed -i 's/olddomain.com/newdomain.com/g' {} +This updates all PHP files in the directory. - On Windows-based Plesk servers, use PowerShell or batch scripting for similar functionality.
Tools for Automated Domain Switching
- No official Plesk extensions perform bulk file content replacement, but SSH access can be enabled for efficient use of shell scripts.
- For WordPress sites, Plesk’s WordPress Toolkit automates domain and URL switching when using its clone or migration features, updating URLs across files and the database.
- For other CMS or site types, external tools like:
- SSH with batch scripting
- Mass file editors (e.g., Notepad++ “Find in Files” feature for local copies)
- Rsync with scripting
Scripting Batch Find-and-Replace
- Use a recursive shell script to process all files:
Customizing Plesk Copy Feature
- Plesk’s copy feature cannot be customized to edit file contents during transfer.
- Such customization must be done post-copy using command-line or scripting utilities.
Best Practices for Domain Changes
- Always back up files and databases before bulk editing, in case of errors.
- After replacement, test the cloned site for broken links, references, or paths—particularly for hardcoded URLs or asset paths.
- For dynamic web apps, update configuration files (such as
wp-config.phpfor WordPress or.envfiles for frameworks) after replacement. - Run the domain change script only on intended file types to avoid corrupting binaries or images.
Summary Table
By employing command-line tools and careful scripting after copying, full domain name replacement in website files can be accomplished efficiently.Bulk domain name replacement during website file copying in Plesk is not natively supported by the built-in copy or site migration features—however, automated replacements can be scripted after the transfer. For WordPress sites, Plesk’s WordPress Toolkit will update URLs automatically during cloning, but for other types of websites, you’ll need to use external tools or custom scripts for automated changes.
Bulk Domain Name Replacement
- After copying your site in Plesk, use SSH to run search-and-replace commands in all relevant files. The most common method is with Linux shell commands:
- Example:text
find /var/www/vhosts/newdomain.com/httpdocs -type f -exec sed -i 's/olddomain.com/newdomain.com/g' {} +
- Example:text
- For Windows-based Plesk servers, use PowerShell scripts to perform bulk replacements.
Integrating Tools with Plesk
- There are no official plugins or extensions for Plesk that handle bulk domain switching in file contents for generic sites.
- For WordPress sites, use Plesk’s WordPress Toolkit “Clone” or “Migrate” features, which also change URLs in the database and files automatically.
- You can edit file contents one-by-one via Plesk File Manager, but this process is manual and not scalable.
Customizing Plesk Copy Feature
- Plesk’s copy feature does not allow content editing or automated search-and-replace during transfer.
- To automate content changes, copy files first, then script your replacements using shell tools as described.
Scripting Batch Find-and-Replace
- For static sites or any CMS:
Best Practices
- Always back up files and databases before starting a bulk replacement operation.
- Test the new site on its new domain, looking for missed references and broken URLs.
- For CMS-driven sites, update config files pointing to domains (like
wp-config.php,.env, or system settings). - For WordPress, use the Toolkit engine or quality plugins designed for safe domain and URL migration.
This workflow ensures website functionality is retained and all hardcoded domain references are accurately replaced after copying.