{"id":10401,"date":"2024-04-28T12:58:30","date_gmt":"2024-04-28T12:58:30","guid":{"rendered":"https:\/\/hostvento.com\/kb\/web-hosting\/getting-started-guide\/shared-hosting-quick-start-guide\/move-wordpress-from-local-server-to-live-site\/"},"modified":"2024-06-14T06:22:15","modified_gmt":"2024-06-14T06:22:15","slug":"move-wordpress-from-local-server-to-live-site","status":"publish","type":"docs","link":"https:\/\/www.hostvento.com\/kb\/docs\/hosting-faqs\/move-wordpress-from-local-server-to-live-site\/","title":{"rendered":"Learn to Manually Move WordPress from Local Server to Live Site"},"content":{"rendered":"\n<p>Once\u00a0you\u00a0have\u00a0finished\u00a0customizing\u00a0your\u00a0website,\u00a0transfer\u00a0it\u00a0from\u00a0your\u00a0computer\u00a0to\u00a0a\u00a0server\u00a0so\u00a0that\u00a0anybody\u00a0can\u00a0view\u00a0it. Let\u00a0us\u00a0explore\u00a0how\u00a0to\u00a0manually\u00a0migrate\u00a0your\u00a0WordPress\u00a0website\u00a0from\u00a0a\u00a0local\u00a0server\u00a0to\u00a0a\u00a0live\u00a0website.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Exporting Local WordPress Database<\/h3>\n\n\n\n<p>First,\u00a0use\u00a0phpMyAdmin\u00a0to\u00a0export\u00a0the\u00a0local\u00a0WordPress\u00a0database.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/phymyadmin-min.png\" alt=\"\" class=\"wp-image-9696\"\/><\/figure>\n<\/div>\n\n\n<p>Navigate to&nbsp;<strong>http:\/\/localhost\/phpmyadmin\/<\/strong>&nbsp;and click on your WordPress database. Then, from the top menu bar click on the&nbsp;<strong>Export<\/strong>&nbsp;button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/export-min-1024x108.png\" alt=\"\" class=\"wp-image-9697\"\/><\/figure>\n<\/div>\n\n\n<p>In the&nbsp;<strong>Export<\/strong>&nbsp;option, select either&nbsp;<strong>\u201cQuick\u201d<\/strong>&nbsp;or&nbsp;<strong>\u201cCustom\u201d<\/strong>. With&nbsp;<strong>Custom<\/strong>, you will get more options for exporting your database.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/export-quick-min-1024x418.png\" alt=\"\" class=\"wp-image-9698\"\/><\/figure>\n<\/div>\n\n\n<p>It is recommended to select&nbsp;<strong>Quick<\/strong>, and then click the&nbsp;<strong>Go<\/strong>&nbsp;button. This will download your database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Uploading WordPress Files to Live Site<\/h3>\n\n\n\n<p>After your database is downloaded, you will need to move your website files to the live site.<br>To start with, open the FTP client and connect to your web hosting account.<br>Make sure the files are uploaded to the correct directory after you have established a connection to your live website. You must upload every file in your public_html directory, for instance, if you wish to host your website on yoursite.com.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/upload-min.png\" alt=\"\" class=\"wp-image-9700\"\/><\/figure>\n<\/div>\n\n\n<p>Choose the local WordPress files and upload them to the live server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Creating MySQL Database on Live Site<\/h3>\n\n\n\n<p>While your WordPress files are being uploaded using the FTP client, begin importing your database onto the live server. The majority of WordPress hosting companies provide cPanel for hosting account management.<br>At first, log in to your cPanel dashboard and click on the\u00a0<strong>MySQL Databases<\/strong>\u00a0icon located in the\u00a0<strong>Databases<\/strong>\u00a0section.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/mysql-databases-min.png\" alt=\"\" class=\"wp-image-9701\"\/><\/figure>\n<\/div>\n\n\n<p>Next, enter a name for your database to create new database and click on the<strong>&nbsp;Create Database<\/strong>&nbsp;button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/create-new-database-min.png\" alt=\"\" class=\"wp-image-9702\"\/><\/figure>\n<\/div>\n\n\n<p>Once you create a database, go to the&nbsp;<strong>MySQL Users<\/strong>&nbsp;section and create a new user or add an existing user to the database.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/make-changes-min.png\" alt=\"\" class=\"wp-image-9703\"\/><\/figure>\n<\/div>\n\n\n<p>The user&#8217;s MySQL rights will then be shown after that. Here, tick every box to give the user full access, then press the &#8220;Make Changes&#8221; button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Importing WordPress Database on Live Site<\/h3>\n\n\n\n<p>Now, you will need to import your WordPress database.<br>In the cPanel dashboard, go to the\u00a0<strong>Databases<\/strong>\u00a0section and click on\u00a0<strong>phpMyAdmin<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/phymyadmin-min.png\" alt=\"\" class=\"wp-image-9696\"\/><\/figure>\n<\/div>\n\n\n<p>After the phpMyAdmin dashboard gets displayed, click on the database you created in<strong>\u00a0Step 3<\/strong>. This will show your new database without any tables.<br>In the top menu, click on the\u00a0<strong>Import<\/strong>\u00a0tab. Once the\u00a0<strong>Import<\/strong>\u00a0page gets displayed, click on\u00a0<strong>Choose File<\/strong>\u00a0button and then select the database file saved in\u00a0<strong>Step 1<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/import-min.png\" alt=\"\" class=\"wp-image-9705\"\/><\/figure>\n<\/div>\n\n\n<p>Next, click the&nbsp;<strong>Go<\/strong>&nbsp;button at the bottom of the page. This will import your WordPress database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Changing the Site URL<\/h3>\n\n\n\n<p>You will need to change the site URL in your database for connecting with the live WordPress site.<br>In\u00a0<strong>phpMyAdmin<\/strong>, search for the<strong>\u00a0wp_options<\/strong>\u00a0table in your database imported in\u00a0<strong>Step 4<\/strong>. In case, you have changed your database prefix, then instead of\u00a0<strong>wp_options<\/strong>, you will see it as\u00a0<strong>{prefix}_options<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/wp-options-browse-min-1024x266.png\" alt=\"\" class=\"wp-image-9706\"\/><\/figure>\n<\/div>\n\n\n<p>Next to&nbsp;<strong>wp_options<\/strong>&nbsp;click on the&nbsp;<strong>Browse<\/strong>&nbsp;button or the link in the sidebar to open the page with list of fields in the&nbsp;<strong>wp_options<\/strong>&nbsp;table as shown below:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/edit-min.png\" alt=\"\" class=\"wp-image-9708\"\/><\/figure>\n<\/div>\n\n\n<p>Search for the\u00a0<strong>siteurl<\/strong>\u00a0under the\u00a0<strong>option_name<\/strong>. Click on the\u00a0<strong>Edit<\/strong>\u00a0icon located at the far left at the start of the row.<br>The\u00a0<strong>Edit<\/strong>\u00a0field window will get displayed. You will see the URL of your local install such as:\u00a0<strong>http:\/\/localhost\/test<\/strong>\u00a0in the input box for\u00a0<strong>option_value<\/strong>. Insert your new site url in this field, for example:\u00a0<strong>https:\/\/howto.idigitalcamp.com\/blog<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/option-value-min.png\" alt=\"\" class=\"wp-image-9707\"\/><\/figure>\n<\/div>\n\n\n<p>Click on the\u00a0<strong>Go<\/strong>\u00a0button to save the changes.<br>Repeat this step for the\u00a0<strong>option_name<\/strong>:\u00a0<strong>home<\/strong>. Since the\u00a0<strong>wp_options<\/strong>\u00a0page is a few pages long, so just search for the name home. Generally, you will find it on the second page.<br>Update the home url similar to your siteurl.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Setting up Your Live Site<\/h3>\n\n\n\n<p>After importing the database and uploading the content, you need to configure WordPress.<br>If you try browsing your site now, you will get an\u00a0<strong>Error Establishing Database Connection<\/strong>\u00a0error.<br>This can be fixed by connecting to your website using an FTP client and editing\u00a0<strong>wp-config.php<\/strong>\u00a0file.<br>Here you need to provide the database name, user and password created in\u00a0<strong>Step 3<\/strong>.<br>Save the\u00a0<strong>wp-config.php<\/strong>\u00a0file and upload it back to your server.<br>Now visit your website, and it will be live now.<br>Next, login to your WordPress admin panel and go to\u00a0<strong>Settings \u00bb General<\/strong>. Scroll to the bottom and click the\u00a0<strong>Save Changes<\/strong>\u00a0button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/settings-general-save-changes-min-1-1024x955.png\" alt=\"\" class=\"wp-image-9711\"\/><\/figure>\n<\/div>\n\n\n<p>With this, the site URL will get corrected anywhere else where it needs to be.<\/p>\n\n\n\n<p>Next go to&nbsp;<strong>Settings \u00bb Permalink<\/strong>&nbsp;and click&nbsp;<strong>Save Changes<\/strong>&nbsp;to check that all post links are working fine.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/settings-permalinks-save-changes-min-1024x694.png\" alt=\"\" class=\"wp-image-9712\"\/><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Step 7: Fixing Images and Broken Links by Updating Paths<\/h3>\n\n\n\n<p>When you move a WordPress site from one domain to another, or from local server to a live site, there will be broken links and missing images.<\/p>\n\n\n\n<p>You can use the&nbsp;<strong>SQL<\/strong>&nbsp;query or use the&nbsp;<strong>Velvet Blues WordPress<\/strong>&nbsp;plugin for fixing this issue.<\/p>\n\n\n\n<p>If you want to do it via\u00a0<strong>SQL<\/strong>, use the below simple SQL query:<br>UPDATE wp_posts SET post_content = REPLACE(post_content, &#8216;localhost\/test\/&#8217;, &#8216;www.yourlivesite.com\/&#8217;);<\/p>\n\n\n\n<p>Go to&nbsp;<strong>phpMyAdmin<\/strong>, click on your database and then click on&nbsp;<strong>SQL<\/strong>&nbsp;from the top menu. Use this query, but replace it with your own local site and live site URLs.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2020\/06\/sql-query-min-1024x407.png\" alt=\"\" class=\"wp-image-9713\"\/><\/figure>\n<\/div>\n\n\n<p>That\u2019s it, you have migrated WordPress from local server to a live site successfully!<\/p>\n\n\n\n<p>Hope that now your live website is up and running smoothly. Browse your website and make sure that everything is working as expected. In case there are any errors, go though this guide to common WordPress errors for help troubleshooting.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once\u00a0you\u00a0have\u00a0finished\u00a0customizing\u00a0your\u00a0website,\u00a0transfer\u00a0it\u00a0from\u00a0your\u00a0computer\u00a0to\u00a0a\u00a0server\u00a0so\u00a0that\u00a0anybody\u00a0can\u00a0view\u00a0it. Let\u00a0us\u00a0explore\u00a0how\u00a0to\u00a0manually\u00a0migrate\u00a0your\u00a0WordPress\u00a0website\u00a0from\u00a0a\u00a0local\u00a0server\u00a0to\u00a0a\u00a0live\u00a0website. Step 1: Exporting Local WordPress Database First,\u00a0use\u00a0phpMyAdmin\u00a0to\u00a0export\u00a0the\u00a0local\u00a0WordPress\u00a0database. Navigate to&nbsp;http:\/\/localhost\/phpmyadmin\/&nbsp;and click on your WordPress database. Then, from the top menu bar click on the&nbsp;Export&nbsp;button. In the&nbsp;Export&nbsp;option, select either&nbsp;\u201cQuick\u201d&nbsp;or&nbsp;\u201cCustom\u201d. With&nbsp;Custom, you will get more options for exporting your database. It is recommended to select&nbsp;Quick, and then click the&nbsp;Go&nbsp;button. This will download your database. Step 2: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":23377,"menu_order":430,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-10401","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/10401","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/comments?post=10401"}],"version-history":[{"count":2,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/10401\/revisions"}],"predecessor-version":[{"id":10404,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/10401\/revisions\/10404"}],"up":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/23377"}],"wp:attachment":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/media?parent=10401"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/doc_tag?post=10401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}