{"id":975,"date":"2022-02-15T08:02:55","date_gmt":"2022-02-15T08:02:55","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2022\/02\/15\/5981410-how-to-restore-a-backup-on-another-hostinger-account\/"},"modified":"2026-04-23T08:23:13","modified_gmt":"2026-04-23T08:23:13","slug":"5981410-how-to-restore-a-backup-on-another-hostinger-account","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/5981410-how-to-restore-a-backup-on-another-hostinger-account\/","title":{"rendered":"How to duplicate a custom website at Hostinger"},"content":{"rendered":"<div class=\"\" data-turn-id-container=\"request-WEB:4babc960-0652-41c2-bc70-f3d0a5dc79e6-0\" data-is-intersecting=\"true\">\n<section class=\"text-token-text-primary w-full focus:outline-none [--shadow-height:45px] has-data-writing-block:pointer-events-none has-data-writing-block:-mt-(--shadow-height) has-data-writing-block:pt-(--shadow-height) [&amp;:has([data-writing-block])&gt;*]:pointer-events-auto R6Vx5W_threadScrollVars scroll-mb-[calc(var(--scroll-root-safe-area-inset-bottom,0px)+var(--thread-response-height))] scroll-mt-[calc(var(--header-height)+min(200px,max(70px,20svh)))]\" dir=\"auto\" data-turn-id=\"request-WEB:4babc960-0652-41c2-bc70-f3d0a5dc79e6-0\" data-testid=\"conversation-turn-2\" data-scroll-anchor=\"false\" data-turn=\"assistant\">\n<div class=\"text-base my-auto mx-auto pb-10 [--thread-content-margin:var(--thread-content-margin-xs,calc(var(--spacing)*4))] @w-sm\/main:[--thread-content-margin:var(--thread-content-margin-sm,calc(var(--spacing)*6))] @w-lg\/main:[--thread-content-margin:var(--thread-content-margin-lg,calc(var(--spacing)*16))] px-(--thread-content-margin)\">\n<div class=\"[--thread-content-max-width:40rem] @w-lg\/main:[--thread-content-max-width:48rem] mx-auto max-w-(--thread-content-max-width) flex-1 group\/turn-messages focus-visible:outline-hidden relative flex w-full min-w-0 flex-col agent-turn\">\n<div class=\"flex max-w-full flex-col gap-4 grow\">\n<div class=\"min-h-8 text-message relative flex w-full flex-col items-end gap-2 text-start break-words whitespace-normal outline-none keyboard-focused:focus-ring [.text-message+&amp;]:mt-1\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"3efa1c0f-9b47-4e2d-8837-a7c4b8db127c\" data-message-model-slug=\"gpt-5-3\" data-turn-start-message=\"true\">\n<div class=\"flex w-full flex-col gap-1 empty:hidden\">\n<div class=\"markdown prose dark:prose-invert w-full wrap-break-word dark markdown-new-styling\">\n<p data-start=\"0\" data-end=\"476\" data-is-last-node=\"\" data-is-only-node=\"\">This guide explains how to create a copy of a custom PHP or HTML website to use with a different domain name within Hostinger web, cloud or Agency plans, allowing you to keep the original site online. Duplicating a website can be useful to turn it into a template for a new project, or as staging environment for testing. You can create the copy on the same or a different hosting plan.<\/p>\n<h3 data-start=\"0\" data-end=\"476\">Before you start<\/h3>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"z-0 flex min-h-[46px] justify-start\">\n<p data-start=\"0\" data-end=\"476\" data-is-last-node=\"\" data-is-only-node=\"\">This method applies specifically to custom-coded websites (PHP\/HTML).<\/p>\n<ul>\n<li data-start=\"0\" data-end=\"476\">To duplicate a WordPress website on the same hosting plan, you can use the <a href=\"https:\/\/www.hostinger.com\/support\/6601521-how-to-copy-a-wordpress-website-to-another-domain-name-in-hostinger\/\">Copy website<\/a> feature.<\/li>\n<li data-start=\"0\" data-end=\"476\">For Hostinger Website Builder sites, follow this guide: <a href=\"https:\/\/www.hostinger.com\/support\/8439478-hostinger-website-builder-how-to-duplicate-a-website\/\">Duplicate Builder website<\/a>.<\/li>\n<li data-start=\"0\" data-end=\"476\">Hostinger Horizons websites can be duplicated from the Websites <span style=\"font-weight: 400\">&rarr; Options (<\/span><span style=\"font-weight: 400\">&#8942;)<\/span> in hPanel.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/section>\n<\/div><h2 id=\"h-step-1-download-the-source-files-and-database\">Step 1 &ndash; Download the source files and database<\/h2><p>Locate the original website is located on hPanel and follow these steps:<\/p><ol>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/2298928-how-to-make-backups-at-hostinger\">Create<\/a> a backup of your website files and database.<\/li>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/5981435-how-to-download-backups-at-hostinger\">Download<\/a> the file backup and the database backup to your computer.<\/li>\n<li>If using a CMS, identify the <a href=\"https:\/\/www.hostinger.com\/support\/3313359-where-to-find-your-website-s-configuration-file\">configuration file<\/a> for your website (e.g., <code>config.php<\/code>) so you know where to update database details later.<\/li>\n<\/ol><h2 id=\"h-step-2-prepare-the-destination-website\">Step 2 &ndash; Prepare the destination website<\/h2><p>Access the Hostinger hosting plan where you want the duplicate website to reside.<\/p><ol>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/1583214-how-to-add-a-domain-to-my-account-how-to-add-a-website\">Add a new domain<\/a> or subdomain to your hosting plan if you haven&rsquo;t already. Alternatively, use a temporary domain.\n<ol>\n<li>The domain must not be the same as the one used in the original website.<\/li>\n<\/ol>\n<\/li>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/1884234-how-to-upload-backup-at-hostinger\">Upload<\/a> the file backup to the public_html folder of the new domain using the File Manager.<\/li>\n<li>Create a <a href=\"https:\/\/www.hostinger.com\/support\/1583542-how-can-i-create-a-new-mysql-database\">new database<\/a>. Take note of the new database name, username, and password, as these will differ from the original.<\/li>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/1884149-how-to-import-a-database-with-phpmyadmin\">Import<\/a> the database backup into the newly created database using phpMyAdmin.<\/li>\n<\/ol><h2 id=\"h-step-3-connect-the-files-to-the-new-database\">Step 3 &ndash; Connect the files to the new database<\/h2><p>To make the duplicated website functional, you must link the uploaded files to the new database:<\/p><ol>\n<li>Open the File Manager for the new website and locate your configuration file.<\/li>\n<li>Edit the configuration file to replace the old database name, username, and password with the credentials of the new database created in Step 2.<\/li>\n<li>Save the changes.<\/li>\n<li>Test the website by visiting the new domain in your browser.<\/li>\n<\/ol><p>&nbsp;<\/p><p><span data-path-to-node=\"17,0\">Your custom website is now duplicated and should be fully operational on the new domain. <\/span><span data-path-to-node=\"17,2\"><span class=\"citation-22\">This copy is entirely independent; any changes you make here will not affect the original website. <\/span><\/span><\/p><p class=\"no-margin\"><b>NOTES<\/b><\/p><ul>\n<li><span data-path-to-node=\"20,2,0,1\"><span class=\"citation-20\">If you encounter an <a href=\"https:\/\/www.hostinger.com\/support\/1583224-how-to-fix-error-establishing-a-database-connection\">&ldquo;Error establishing a database connection&rdquo;<\/a> double-check that the credentials in your configuration file exactly match your new database details. <\/span><\/span><\/li>\n<li data-path-to-node=\"20,2,0\"><span data-path-to-node=\"20,3,0,1\"><span class=\"citation-19\">Ensure the new domain is correctly pointed to Hostinger for the website to load.<\/span><\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Creating a copy of a PHP\/HTML website in Hostinger<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[236],"tags":[],"class_list":["post-975","post","type-post","status-publish","format-standard","hentry","category-backups-management"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/5981410-how-to-restore-a-backup-on-another-hostinger-account\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/5981410-como-restaurar-una-copia-de-seguridad-en-una-nueva-cuenta-de-hosting-de-hpanel-en-hostinger\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/5981410-comment-restaurer-une-sauvegarde-sur-un-nouveau-compte-d-hebergement-hpanel-chez-hostinger\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/5981410-bagaimana-cara-memulihkan-backup-di-akun-hosting-hpanel-baru-di-hostinger\/","default":0},{"locale":"lt-LT","link":"https:\/\/www.hostinger.com\/lt\/support\/5981410-kaip-atkurti-atsargine-svetaines-kopija-naujoje-hostinger-paskyroje\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/br\/support\/5981410-como-restaurar-um-backup-em-uma-nova-conta-de-hospedagem-no-hpanel-hostinger\/","default":0},{"locale":"uk-UA","link":"https:\/\/www.hostinger.com\/ua\/support\/5981410------\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=975"}],"version-history":[{"count":9,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/975\/revisions"}],"predecessor-version":[{"id":9942,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/975\/revisions\/9942"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}