{"id":9479,"date":"2020-02-07T12:27:33","date_gmt":"2020-02-07T11:27:33","guid":{"rendered":"https:\/\/www.oderland.se\/support\/artikel\/hur-aterstaller-jag-min-wordpressinstallation-fran-backup\/"},"modified":"2026-02-13T16:34:10","modified_gmt":"2026-02-13T15:34:10","slug":"how-do-i-restore-my-wordpress-installation-from-backup","status":"publish","type":"ht_kb","link":"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-restore-my-wordpress-installation-from-backup\/","title":{"rendered":"How do I restore my WordPress installation from backup?"},"content":{"rendered":"\n<p>From time to time you might need to restore your WordPres installation from backup, <em>e.g.<\/em> if the site has stopped working after an update, or if you edited some code on the site resulting in it no longer working. In this guide we&#8217;ll go through how you restore your site. Since a WordPress installation consists of both files and a database we will tell you how to restore both.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">Keep in mind that a backup recovery overwrites the current files and database for the site. For example, if you have a webshop, you might lose orders if you restore from a previous date.<br><br>Since orders and such are stored in the database, feel free to try restoring just the files first and see if that solves the problem.<\/p>\n\n\n\n<p>To get started with the restoration, <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-login-to-cpanel\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"log on to cPanel (\u00f6ppnas i en ny flik)\">log on to cPanel<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to restore files<\/h2>\n\n\n\n<p>To restore files for your WordPress installation, you first must know what folder you need to restore.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">If the installation uses the main domain for the account<\/h3>\n\n\n\n<p>If the installation is reachable via the main domain for the web hosting account (the one <em>e.g.<\/em> mentioned on invoices from us), you&#8217;ll find its files in the folder <code>public_html<\/code> on the account. Therefore, you may restore that specific folder using our tool Acronis Backup according to <a rel=\"noreferrer noopener\" aria-label=\"these instructions (\u00f6ppnas i en ny flik)\" href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-restore-backups-via-acronis-backup\/#how-to-restore-files\" target=\"_blank\">these instructions<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\">Do not restore the entire public_html folder if you have other domains&#8217; document roots set to folders inside public_html. Instead, selectivly restore folders and files for the site itself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">If the installation uses an addon domain or a subdomain on the account<\/h3>\n\n\n\n<p>If you, on the other hand, have installed WordPress on an addon domain or a subdomain on your account, you need to doublecheck what folder the installation recides in. To check this, do the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>When you&#8217;re logged on to cPanel, click the icon <code>Addon Domains<\/code> (or <code>Subdomains<\/code>, the principle is the same).<br><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains.png\"><img loading=\"lazy\" decoding=\"async\" width=\"690\" height=\"215\" class=\"wp-image-18530\" style=\"width: 690px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains.png\" alt=\"\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains.png 690w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains-300x93.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains-50x16.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains-60x19.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains-100x31.png 100w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><\/a><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/09\/cpanel_tillaggsdomaner3.png\"><\/a><\/li>\n\n\n\n<li>Scroll down and you&#8217;ll see a table with all addon domains (or subdomains). In the column <code>Document root<\/code>, you&#8217;ll find in which folder the installation recides.<br><figure><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2020\/02\/cpanel_document_roots.png\"><img loading=\"lazy\" decoding=\"async\" width=\"418\" height=\"145\" class=\"wp-image-9481\" style=\"width: 418px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2020\/02\/cpanel_document_roots.png\" alt=\"Document roots\"><\/a><\/figure><\/li>\n<\/ol>\n\n\n\n<p>You now know which folder you need to restore from backup. Follow the <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-restore-backups-via-acronis-backup\/#how-to-restore-files\">instructions here<\/a> to restore the folder.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to restore databases<\/h2>\n\n\n\n<p>Before you restore the database for your WordPress installation,  you must know which database is being used by the site. You can find this out via the <code>wp-config.php<\/code> file for the installation. First, find the document root for the site (where the config file usually is found) according to the instructions above and check the file&#8217;s content. You can use <a rel=\"noreferrer noopener\" aria-label=\"SSH (\u00f6ppnas i en ny flik)\" href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-connect-to-my-web-hosting-account-using-ssh\/\" target=\"_blank\">SSH<\/a>, FTP or the file manager built in to cPanel to do this. Look for these lines:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/** The name of the database for WordPress *\/ \ndefine('DB_NAME', 'database_name');<\/pre>\n\n\n\n<p>In your wp-config.php file, the phrase &#8220;database_name&#8221; will be replaced by the name of the database your installation is using.<\/p>\n\n\n\n<p>With this knowledge, you&#8217;re now able to restore the database by following <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-restore-backups-via-acronis-backup\/#how-to-restore-databases\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"the steps described here (\u00f6ppnas i en ny flik)\">the steps described here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From time to time you might need to restore your WordPres installation from backup, e.g. if the site has stopped working after an update, or if you edited some code on the site resulting in it no longer working. In this guide we&#8217;ll go through how you restore your site&#8230;.<\/p>\n","protected":false},"author":12,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"ht-kb-category":[194],"ht-kb-tag":[],"class_list":["post-9479","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-backup-and-restore"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/9479","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/comments?post=9479"}],"version-history":[{"count":21,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/9479\/revisions"}],"predecessor-version":[{"id":24956,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/9479\/revisions\/24956"}],"wp:attachment":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/media?parent=9479"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-category?post=9479"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=9479"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}