Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPBカップ
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPressをローカルサーバーからライブサイトに移動する方法(2つの方法)

WordPressユーザーの多くは、コンピューター上のローカルサーバーを使用してサイトで作業することを好みます。これにより、オンラインで変更を公開する前に、個人的にサイトで作業することができます。

最終的には、ライブサーバーに移行し、オンライン訪問者がアクセスできるようにする必要があります。この移行は、本番サイトでサイトが正しく機能するようにするために非常に重要です。

私たちは多くのローカルサイトに携わってきたので、コンテンツをライブサイトに移行する最も簡単な方法を学ぶ必要がありました。

この投稿では、WordPressをローカルサーバーからライブサイトに移行する方法をステップバイステップで説明します。

How to move WordPress from local server to live site (2 methods)

なぜWordPressをローカルサーバーからライブサイトに移行するのか?

WordPressブログをローカルサーバーに構築することは、訪問者に影響を与えることなくサイトの変更をテストする安全な方法です。

サイトの完成度が高まったら、次のステップはローカルサーバーからライブサイトに移行することです。

ローカルサーバーからライブサイトにサイトを移動する2つの方法を紹介しよう。

最初の方法はWordPressの移行プラグインを使用するもので、初心者におすすめです。

2つ目の方法では、WordPressをローカルサーバーからライブサイトに手動で移動する方法を紹介します。

自分に合った方法を選べばいい:

WordPressサイトを移行する前に

WordPressをローカルサーバーからライブサーバーに移行するには、いくつかの準備が必要です。

まず、コンピューター上のローカルサーバー(localhostとも呼ばれる)でWordPressサイトが稼動しており、そのサーバーにフルアクセスできると仮定する。

次に、ドメイン名と ホスティングサービスが必要です。

私たちは、貧弱なプロバイダーや無料のホスティングサービスから始めて後悔した初心者から数え切れないほどの話を聞いてきました。私たちの経験では、適切なホスティングサービスを選択することは、任意のサイトの成功に不可欠です。

あなたの決定を容易にするために、私たちはBluehostを使用することをお勧めします。Bluehostは公式推奨のWordPressホスティングサービス会社で、WPBeginnerユーザーに限定割引+ドメインとSSLを無料で提供しています。

基本的に、月額1.99ドルから始めることができる。

あなたは偉大なBluehostの代替をしたい場合は、Hostingerを見ることができます。彼らはまた、無料のドメイン名とWPBeginnerユーザーに排他的な割引を提供しています。

もう少し支払う余裕があるなら、SiteGroundをチェックしよう。WPBeginner読者向けの特別価格もあります。

サイトの立ち上げにお困りの方は、ステップ・バイ・ステップのガイドに従ってください。

最後に、FTPプログラムと、ローカルサーバーのサイトをライブサイトにアップロードするためのFTPの使い方を知っている必要があります。

準備はいいですか?WordPressサイトの移行を始めましょう。

動画チュートリアル

Subscribe to WPBeginner

もし、文章での説明がお望みなら、このまま読み進めてほしい。

方法1:移行プラグインを使ってWordPressをローカルサーバーからライブサイトに転送する(推奨)

この方法は簡単で、初心者におすすめです。WordPress移行プラグインを使用して、WordPressをローカルホストからライブサイトに移行します。

ステップ1:Duplicatorプラグインのインストールとセットアップ

まず、ローカルサイトにDuplicatorプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

プロのヒント Duplicatorのプロバージョンもあり、安全なバックアップ、クラウドストレージ、簡単なサイトの復元などが可能です。

有効化した後、Duplicator ” Packagesページで’新規作成’ボタンをクリックしてください。

Create new package for migration

バックアップに名前を付ける画面になります。

そして、「次へ」ボタンをクリックする。

Name backup package

Duplicatorはいくつかのテストを実行し、すべてが正常かどうかを確認します。

すべての項目が「Good」となっていれば、「Build」ボタンをクリックする。

Build package

サイトのサイズによっては、この処理に数分かかる場合があります。完了するまで、このタブを開いたままにしておく必要があります。

完了すると、「インストーラ」と「アーカイブ」パッケージのダウンロードオプションが表示されます。両方のファイルをコンピューターにダウンロードするには、「ワンクリックダウンロード」リンクをクリックする必要があります。

Download package files

アーカイブ」ファイルはWordPressサイトの完全なコピーです。WordPressのコアファイル、画像、アップロード、テーマ、プラグイン、WordPressデータベースのバックアップがすべて含まれています。

インストーラ」ファイルは、サイトを含むアーカイブファイルを解凍することで、移行プロセス全体を自動化するスクリプトです。

ステップ2: WordPressサイトのデータベースを作成する

インストーラを実行したり、WordPressウェブサイトをローカルホストからホスティングサービスサーバーにアップロードしたりする前に、新しいライブウェブサイト用のMySQLデータベースを作成する必要があります。

すでにMySQLデータベースを作成している場合は、このステップは省略できる。

データベースを作成するには、ホスティングサービスのcPanelダッシュボードにアクセスする必要があります。次に、「データベース」セクションを探し、「MySQLデータベースウィザード」アイコンをクリックします。

MySQL Database Wizard

次の画面では、新しいデータベースを作成する欄がある。

データベースの名前を入力し、「データベースを作成」ボタンをクリックします。

Name new database

cPanelはあなたのために新しいデータベースを作成します。

その後、新規ユーザーのユーザー名とパスワードを入力し、「Create User」ボタンをクリックします。

Create new database user

次に、作成したユーザーをデータベースに追加する必要があります。

まず、「すべての権限」のチェックボックスをクリックします。

Check all privileges

その後、下にスクロールして「変更を加える」ボタンをクリックし、変更を保存します。

これでWordPressサイトでデータベースを使用する準備が整いました。データベース名、ユーザー名、パスワードは本当に〜してもよいですか?この情報は次のステップで必要になります。

ステップ3:ローカルサーバーからライブWordPressサイトへのファイルのアップロード

ここで、アーカイブとインストーラファイルをローカルサイトからホスティングサービスアカウントにアップロードする必要があります。

まず、FTPクライアントを使用してライブサイトに接続します。接続したら、サイトのルートディレクトリが完全に空であることを確認してください。

通常、ルート・ディレクトリは/home/public_html/フォルダーです。

WordPressホスティングサービス会社によっては、サインアップすると自動的にWordPressがインストールされます。もしそこにWordPressのファイルがあるなら、削除する必要がある。

その後、Duplicatorから空のルートディレクトリにarchive.zipとinstaller.phpファイルをアップロードします。

Upload archive and installer files

ステップ4:移行スクリプトの実行

移行ファイルのアップロードが完了したら、ブラウザーで以下のURLにアクセスする必要があります:

http://example.com/installer.php

example.com」を自分のドメイン名に置き換えることをお忘れなく。

Duplicator 移行ウィザードが起動します。

インストーラはいくつかのテストを実行し、スクリプトを初期化します。

Duplicator migration wizard step 1

Setup セクションでは、MySQL ホスティングサービス、データベース名、ユーザ名、パスワードを入力するよう求められます。

ホスティングサービスはローカルホストになるでしょう。その後、先のステップで作成したデータベースの詳細を入力します。

その後、’Validate’ボタンをクリックし、入力した内容が正しいことを確認します。

Validate settings

その後、「Next(次へ)」ボタンをクリックして進みます。

Duplicatorはアーカイブから新しいデータベースにWordPressデータベースのバックアップをインポートします。

また、ローカルサイトと新しいライブサイトを指すURLも更新されます。

管理者ログイン」ボタンをクリックして、ライブサイトのWordPress管理エリアに入ることができます。

Admin login

ライブサイトにログインすると、Duplicatorは自動的にインストールファイルをクリーンアップします。

これですべてです。ローカルサーバーからライブサイトへのWordPressの移動は成功です。

方法2:WordPressをローカルサーバーからライブサイトに手動で転送する。

この方法では、WordPressをローカルサーバーからライブサイトに手動で移動する方法を紹介します。最初の方法がうまくいかなかった場合や、手動で行いたい場合に役立ちます。

ステップ1:ローカルのWordPressデータベースをエクスポートする

最初に行う必要があるのは、ローカルのWordPressデータベースをエクスポートすることです。そのためにphpMyAdminを使用します。

phpMyAdminに慣れていない方は、phpMyAdminを使ったWordPressデータベース管理のガイドをご覧ください。

http://localhost/phpmyadmin/、WordPressデータベースをクリックします。次に、上のメニューバーから「エクスポート」ボタンをクリックします。

Export from localhost

Export method:’オプションで、’Quick’または’Custom’を選択できます。カスタマイザーでは、データベースをエクスポートするためのオプションが増えます。

しかし、「クイック」を選択し、「Go」ボタンをクリックしてデータベースをダウンロードすることをお勧めします。

Export WordPress database using phpMyAdmin

ステップ2:WordPressファイルをライブサイトにアップロードする

次に、すべてのウェブサイトファイルをライブサイトに移動する必要があります。

まず、FTPクライアントを開き、ホスティングサービスアカウントに接続します。

ライブサイトに接続したら、正しいディレクトリにファイルをアップロードしていることを確認してください。例えば、サイトを’yoursite.com’にホスティングサービスしたい場合、public_htmlディレクトリにすべてのファイルをアップロードします。

ローカルのWordPressファイルを選択し、ライブサーバーにアップロードします。

Upload WordPress files FTP

ステップ3: ライブサイトにMySQLデータベースを作成する

FTPクライアントがWordPressファイルをアップロードしている間に、データベースのライブサーバーへのインポートを開始できます。

ほとんどのWordPressホスティングサービスプロバイダは、あなたのホスティングアカウントを管理するためにcPanelを提供していますので、我々はcPanelを使用してデータベースを作成する方法を紹介します。

まず、cPanelダッシュボードにログインし、「データベース」セクションにある「MySQLデータベースウィザード」アイコンをクリックします。

Select MySQL database wizard

次の画面では、新しいデータベースを作成することができます。

データベースの名前を入力し、「データベースを作成」をクリックします。

Name and create new database

cPanelは自動的に新しいデータベースを作成します。

次に、新規ユーザーのユーザー名とパスワードを入力し、「ユーザーを作成」をクリックします。

Create new database user

その後、作成したユーザーをデータベースに追加する必要がある。

まず、’All Privileges’ チェックボックスをチェックする。

Check all privileges checkbox

その後、下にスクロールして「変更を加える」をクリックし、変更を保存します。

WordPressサイトの新規データベースの作成が完了しました。

ステップ4:WordPressデータベースをライブサイトにインポートする

次のステップでは、WordPressデータベースをインポートします。

cPanelのダッシュボードに行き、「データベース」セクションまでスクロールダウンし、「phpMyAdmin」をクリックします。

Click on phpMyAdmin

phpMyAdminに移動し、先ほど作成したデータベースをクリックします。phpMyAdminには、テーブルのない新しいデータベースが表示されます。

次に、上部メニューの「インポート」タブをクリックします。インポートページで「ファイルを選択」ボタンをクリックし、最初のステップで保存したローカルサイトのデータベースファイルを選択します。

Import database via phpMyAdmin

その後、ページ下部の「Go」ボタンをクリックします。データベースが自動的にphpMyadminにインポートされます。

ステップ5:サイトURLの変更

次に、データベースのサイトURLを変更して、ライブWordPressサイトに接続できるようにする必要がある。

phpMyAdminで、先ほどインポートしたデータベースのwp_optionsテーブルを探します。

データベースのプレフィックスを変更した場合、wp_optionsの代わりに{new_prefix}_optionsになるかもしれません。

次に、wp_optionsの隣にある「Browse」ボタンをクリックします。または、サイドバーのリンクをクリックして、wp_optionsテーブル内のフィールドのリストがあるページを開きます。

Browse the wp options table

次にoptions_nameカラムでsiteurlオプションを探す必要があります。

次に「編集」アイコンをクリックする。

Edit siteurl in phpMyAdmin

フィールドを編集するウィンドウが表示されます。

入力ボックスoption_valueには、ローカルインストールのURLが表示されます。http://localhost/test のようなものです。

このフィールドに新規サイトのURLを挿入する必要があります。例:https://www.wpbeginner.com.

その後、「Go」ボタンをクリックしてフィールドを保存することができます。

edit the siteurl field

次に、上記と同じ手順でホーム・オプション名を設定します。wp_optionsメニューは数ページにわたることがあります。通常、ホームオプションは2ページ目に設定されます。

次に、ホームURLを更新し、ライブサイトのURLと同じにする。

ステップ6: ライブサイトのセットアップ

データベースのインポートとコンテンツのアップロードが完了したら、次はWordPressの設定です。

このとき、サイトには「Error establishing a database connection(データベース接続の確立エラー)」というエラーが表示されているはずです。

これを修正するには、FTPクライアントを使用してサイトに接続し、wp-config.phpファイルを開きます。

以下のコード行を探すことになる:

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'database_name_here' );
/** MySQL database username */
define( 'DB_USER', 'username_here' );
/** MySQL database password */
define( 'DB_PASSWORD', 'password_here' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

先に作成したデータベース名、ユーザー名、パスワードをプロバイダーとして入力する必要があります。

次に、wp-config.phpファイルを保存し、WordPressホスティングサービスサーバーにアップロードします。

さて、あなたのサイトにアクセスすると、それはライブであるべきだ。

その後、WordPress管理画面にログインし、設定 ” 一般に移動する必要があります。その後、何も変更せずに一番下までスクロールし、「変更を保存」ボタンをクリックします。

Save general settings

これにより、サイトのURLが必要な場所に修正されるようになります。

それができたら、設定 ” パーマリンクに行き、スクロールダウンして「変更を保存」をクリックし、すべての投稿リンクが問題なく機能していることを確認してください。

Save permalinks settings

WordPressサイトをあるドメインから別のドメインへ、またはローカルサーバーからライブサイトへ移動する際には、必ずリンク切れや画像の欠落に直面します。

URLを更新する2つの方法をご紹介します。あなたに最適な方法を選んでください。

1.Search & Replace Everythingプラグインを使ってURLを更新する(推奨)

これを解決する最も安全な方法は、Search & Replace Everythingを使用することです。これは強力なWordPressプラグインで、複雑なデータベースクエリーを書くことなく、簡単にサイトの一括更新作業を行うことができます。

まず、Search & Replace Everythingプラグインをインストールして有効化する必要があります。

有効化した後、Tools ” WP Search & Replaceページにアクセスしてください。

Search and replace URLs from local to live site migration

ここから、’Search for’フィールドにローカルサイトのURLを、’Replace with’フィールドにライブサイトのURLを入力する必要があります。

少しスクロールして、テーブルの下の「すべて選択」をクリックします。これにより、プラグインがデータベース内のあらゆる場所で古いURLを探すようになります。

Select tables

ここで「検索と置換のプレビュー」ボタンをクリックして続行する。

プラグインは、古いURLのすべてのインスタンスをデータベースから検索し、結果をプレビューします。

Preview changes

問題がなければ、「すべて置換」をクリックして変更を保存する。

変更についての警告が表示されます。続行するには「はい」をクリックしてください。

プラグインはデータベースを更新し、ローカルのURLを現在のサイトのURLに置き換えます。

2.手動でURLを更新する(上級者向け)

URLを更新するもう一つの方法は、以下のSQLクエリーを使うことである:

UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/test/', 'www.yourlivesite.com/');

phpMyAdminにアクセスしてデータベースをクリックし、上部メニューから「SQL」をクリックして上記のクエリーを追加するだけです。

ローカルサイトとライブサイトのURLに変更し、「Go」ボタンをクリックすることを本当に〜してもよいですか?

Fixing WordPress images and broken URLs after moving to live site

これで完了です。これでローカルサーバーからライブサイトへのWordPressの移行は成功です。

うまくいけば、あなたのライブサイトはスムーズに稼働しています。エラーにお気づきの場合は、WordPressの一般的なエラーガイドをご覧いただき、トラブルシューティングにお役立てください。

この投稿が、WordPress をローカルサーバーからライブサイトに移行する際にお役に立てば幸いです。また、ライブサイトからローカルサーバーへの移行に関するガイド、または WordPress 移行の実践的な手順に関する究極のウェブサイト移行チェックリストもご覧ください。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

アバター

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

909件のコメント返信を残す

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Mark

    Hi!

    I’ve done until step 6 and was able to get the Error Database Connection and I was thrilled! when i changed the parameters the error changed to Error 500. And now I’m stuck.

    My local MAMP DB is named “localdatabase” and the new one that I created in the live site have a prefix that I cannot edit so now my new database name in the live site is “web_localdatabase”

    Question:
    1. Should the my local database name be the same with the one in the live site?
    2. If not, is there any other changes I need to do aside from the changes in Step 6?

    Thanks!!!!!!!

  3. Cindy

    Hi there,
    I thought I followed your steps to the letter. I accessed localhost through WAMP. cPanel is through StableHost. FTP using FileZilla. After the migration I looked at my site and saw that half of my most recent post was missing. It had never been published; it was the first post I created in localhost. (I recently moved from wp.com to wp.org. Had less than 20 posts at time of transfer. All of them migrated from localhost to live with no errors.) I had no ‘failed transfers’ during the FTP upload. No errors that I noticed.

    After seeing the incomplete blog post, I tried to access localhost to view the original content using WAMP. That project name can no longer be displayed. I cannot access my blog content on localhost using the name I assigned prior to the migration. The folder is still present in www.

    I must have done something right since part of a post that was never on my live site did make it there. Can you tell me what happened to my localhost? I don’t have anything in sub folders…it’s all pretty straight forward and I tried to keep it simple.

    Troubleshooting:
    Ran SQL query per your Step 7, message is: #1146 – Table ‘sxxxxx_wp574.wp_posts’ doesn’t exist. wp_574 is the database name I created in Step 3. Query was localhost name and website domain.
    Restarted computer.
    WAMP ‘Restart all services’ option.

    Right now I’m completely confused! I not only do not know what to do next but am fearful of trying a Google suggestion for fear of really screwing things up. Can you help me? Any insight into the incomplete migration would be good to know too but I’m more freaked out about localhost at the moment. Thanks so much. You’re instructions are very easy to follow and understandable.

    Kind Regards, cindy

  4. Lea Jacta Est

    Hello!
    I have issues updating my links (step 7). It seems to be an URL match problem. Using Velvet Blues, I’m typing my old URL in the required field and I do the same for the new URL but there’s an error message showing every time I try.
    Just to check :
    – my old URL = my localhost URL which is in the general settings and which shows in the address bar when I go to my homepage
    – my new URL : my brand new domain name which ends by .com
    … right ?

    Does the error comes from somewhere else or am I doing it this wrong ?

    Thanks a lot for your help.

  5. Jeff Bradbury

    I currently have my live site at. I want to download it to MAMP (Mac) and begin the process of redesigning locally and then I want to put it back fresh.

    1) When I’m ready to upload the new site, do I put it over top of the current folder? Do I create a new folder (or subdomain) and stick it in that directory and then move the domain/DNS to the new site?

    2) I have a bunch of pretty links on the live site that I wish to download and begin working on … I think i’m correct in thinking that Pretty links just take the form of whatever the domain currently is.

    3) Is this the best process if you want to constantly be working locally and updating your site on a daily/weekly basis? This appears to be a great method if you want a One and Done method of updating a site. If there is another way or method of working locally and then uploading the changes …. or even syncing a live/local site, I would love some help and advice. THANK YOU!

    • WPBeginner Support

      1. Depends on what files you have changed and what changes you made that are stored in the database. We assume that you will be working on your theme and would probably make few changes that will be stored in database. In that case, you can just overwrite your theme files and update your database from a backup.

      2. If by pretty links you mean the permalink settings, then we think that those will not be affected.

      3. If you are planning on continuously working on your site, then this strategy would work but it is not the best solution. You need a solution that allows you to automatically sync your development site to your live site. For example, take a look at our tutorial on how to create a staging environment for your WordPress site. Subscribe to WPBeginner, we will soon cover this topic in an upcoming article with detailed instructions.

      管理者

  6. Felipe Stabile

    THANK YOU GUYS!
    Things went smooth after some problems and thinking, but it was because my host is a little different, and i´ve got problems uploading my files to the FTP using Filezilla. Serious docs got a failure message, but i solve that by doing the following:
    If someone here is using smarterasp, you´d be better not using Filezilla, use the integrated (HostingControlPanel/MyWebsites//FileManager).
    With your database clean, You have to zip your files from HTDOCS/wordpress, and then upload this zip file.
    In the integrated File Manager you have the option for unzip. wait a little bit, until all folders and docs appear.
    Then follow the tutorial above and you´ll be ok.

  7. Mohit

    Hey wpbeginner,

    Thanks a lot for this tutorial. Its the best one I have came across.

    Followed this step by step and got the expected results.

    Keep up the good work !

    Cheers!

  8. Abhay

    Many-many thanks bro. it worked very well.

  9. Biniam

    Thanks a million!!!

  10. jay capulong

    hi all is ok, but the others picture is not showing,

    what do you mean localhost/test? (local site)

    thanks

  11. M3N

    Hi. Thanks for this great tutorial.
    One question though…
    Following steps you described doesn’t cause problem with serialized data. I saw some tutorials recommended to use a script or other thing to avoid the problem with serialized data when changing file paths manually.
    Any idea or suggestion ?

  12. Mark

    Hi, I don’t know if anyone suffered from a redirect to their local host when they ran wp-admin. I did but I found a post over at stackoverflow that sorted me out. Basically I had to update the filepaths in the WP-Options table.

    Good luck.

    MT

  13. Mujtaba Zia

    *** This is the best ever tutorial of my life ***
    I know about html/css but never worked on wordpress, this tutorial helps me lot and have my site live by following every step and wordings of it. Thank you so so much!

    Now very eager to learn more through this website.

  14. Kathy

    I’m encountering some serious problems when transferring to live server. Locally I have 2 sites using the same theme. Both running off separate databases and sites, both work perfectly locally. One site is uploaded and running fine and i’m in the process of uploading the second, here’s where it goes wrong. I’ve exported and created the database, working perfectly all images appear correct. I uploaded all the files and amended the config then ran in to problems. I appear to have no content loading and only half a theme along with the incorrect logo of the site. I tried to login in to amend all links but i am returning an ‘internal server error’ the sever encountered internal error or misconfiguration and was unable to complete your request.

    I have rolled the site back to it’s previous look but i am at a complete loss as to next steps, can anyone help? I can not understand how we are working perfectly locally and then an epic fail on live.

    • Kathy

      p.s. I have screenshots if that helps.

  15. DaveJorg

    Heads up that sometimes after the migration is complete only the home page works.

    If this is the case visit Dashboard > settings > pemalinks and click save changes. I believe it updates the mod_rewrite and should fix the issue. It did for me.

  16. RW

    Please remove my email from the comments thread. I’ve tried to unsubscribe each time and it’s not working.

  17. Carlo

    Thanks for this guide. I’m a more than a beginner in this field. How can I proceed if I have a database already installed on my hosting. Do I have to delete it and make new one, cancel the tables or simply empty them? Thanks in advance for your help

  18. Nathan

    I moved everything and it went smooth until I tried logging in to WP it keeps saying password incorrect. I even tried changing details in phpMyAdmin. Could the problem be that I ran your query before logging in to WP?

    • Nathan

      I fixed the problem, i just signed in to WP and re-saved permalinks and whole site was update. Thanks for the great tutorial.

  19. Angela

    Unfortunately, I wasn’t able to move my site from localhost to online. I got to the login page and it wouldn’t accept my login information. Any idea what the problem could be? I don’t want to give up on it so I may try again.

    • Omar Zeidan

      Hi Angela,

      Well, you might forgot to import the DB files to your live server, did you ?

      If nothing worked with you then try the following,

      Access your DB admin panel, find the wp_users and manually add one there.

      Hope this helps.

  20. Pranesh

    Excellent guide. Everything went fine. Thanks a lot !!

  21. Ziga

    Hello, i followed all steps, and at step #4, i choose .gzip file to import, and got the following error:

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘?’ at line 2

    Any help?

  22. Justin

    Everything works except my other pages…. Can’t figure it out

    • Matt

      Similar issue for me. Have added it to a subfolder on another one of my domains, but when I navigate to it, I’m shown the Themes 404 page. When I try to go directly to any of the other pages, I get my hosts 404 page. Any ideas anyone?

  23. Ryan

    I’ve gone through all the steps, and my site ends up not looking at all like it did. It appears most of the CSS didn’t transfer over. I was using the Divi theme.

    Here is what it looks like:

    Any tips?

  24. Amefon

    HELLO

    i got this error while trying to import my database onto the site

    Error
    SQL query:


    — Database: `lcmi`

    CREATE DATABASE IF NOT EXISTS `lcmi` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

    MySQL said: Documentation

    #1044 – Access denied for user ‘lazarbwn’@’localhost’ to database ‘lcmi’

    how do i solve this?

      • Amefon

        i do not understand. Am I to change the MySQL details or what.

  25. Mike Casile

    Have not done this yet, but local site is looking good. I do have 2 questions (which may really be too big and may require follow-on articles).

    1. If I go thru this and it comes out nice on the live site … but I want to continue doing new development locally, is there a similar process for incremental changes?

    2. How will this be impacted if I use multiSite (which I’m NOT doing right now).

    Thanks,

    • Roman

      It depends on what your changes are affecting – if you have changed some css or php code in theme, you will need tu push changed files on server using FTP. If you change some wordpress settings, you only need to go through steps of copying your database.

  26. Ameira

    Thank you for this tutorial – after 2 weeks of trying everything under the sun finally found out what was missing. I have been able to access my website but images are missing and the layout is all over the place. I followed step 7 and it did improve the improve slightly but still quite a mess – any ideas on what else I can do?

  27. Soo

    Easy to understand and follow.
    The best tutorial about”How to Move WordPress From Local Server to Live Site”.

    Thank you

  28. zavera

    Hi WPBEGINNER SUPPORT, i have created custom wordpress site with some pages and used all the steps you mentioned here and all worked correctly but my pages urls are still localhost how to change these urls for pages?

    • WPBeginner Support

      If you can access the admin area then go to settings -> General and change your WordPress URL and Site URL. Or look at the step 5 to do that through phpmyadmin.

      管理者

  29. Daniel Afriyie Gyimah

    ples we need the information in a downloadable PDF format

  30. Andres

    Hello ! I tried using this method and I get the following error:

    lessphp fatal error: load error: failed to find /Applications/MAMP/htdocs/breg/wp-content/themes/theme43776/bootstrap/less/bootstrap.lesslessphp fatal error: load error: failed to find /Applications/MAMP/htdocs/breg/wp-content/themes/theme43776/style.less
    Warning: Cannot modify header information – headers already sent by (output started at /home/weliketo5/public_html/breg/wp-content/themes/CherryFramework/includes/less-compile.php:155) in /home/weliketo5/public_html/breg/wp-includes/pluggable.php on line 1207

    Could anybody help me out?

  31. Alfredo Garcia

    While doing step #4: Import WordPress Database on Live Site, I get the following SQL error:

    Error
    MySQL said: Documentation

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘?’ at line 105

    Can you tell me what is wrong and how I can fix this?

    • WPBeginner Support

      The backup file you are trying to import could be corrupt. Export a fresh copy and then try again. If this does not work, then ask your web hosting provider to update your MySQL version.

      管理者

      • Alfredo Garcia

        Thank you. I’ll try it tonight.

  32. Ngabe R

    I was missing step 5. Thanks a lot. Very helpful!

  33. Adam

    Do I need to install WordPress on my server before beginning this process, or do I just follow the steps as listed?

    • WPBeginner Support

      No, please see step 2. You will upload WordPress files from your local server to the live server.

      管理者

      • Adam

        Thanks, I’ve got it all working now! This was a really, really helpful tutorial!

  34. Rod

    Thanks, very helpful ! Once I worked out the correct server name on the host et all went well.

  35. Yonatan

    Great article and really helpful.
    Tnx!

  36. Momodu Oladapo Abraham

    it worked thanks, however there arre still some links connecting to the local server address most experienced on the posts and blogs…what do i do ..please help…every other thing has worked fine except the posts. Thanks

  37. Natharza

    Hey

    Everything worked out but the post links are not working. I do run the sql query still links were broken with the error “No input file specified.”

    Please help

  38. Michael

    Thanks for this article. It saves me from stress of redesign online

  39. Sarah

    Thanks for a great tutorial, followed every steps and nothing went wrong !
    THUMBS UP +++

  40. Fongoh Tayong

    Man, you are the bomb.

    It worked for me like charm.

    More power to you to write more tutorials on this. I am newbee to wordpress.

    Thanks again.

  41. Louise

    Hi,

    With step 2, if you dont have a public_html directory where else can you upload the file under? as per Milos question. I have gone into file manager and to httpdocs file and uploaded it there.
    Thanks

  42. Max

    Thank you for a really simple, easy to follow tutorial on how to migrate a database. I notice that you didnt’ state to update the DB_HOST name, but otherwise this was great.

  43. Stefano

    Hi! First of all thnx for the detailed guide.
    I followed all the steps without problem. Anyways, the theme and all the plugins i had installed on localhost are missing causing the page looking completely different. What can i do to import all previous plug-in and settings? Thank you in advance for toyr reply

  44. Junn

    Hi thank you for this tutorial, It works for me! However, I cant find the pages I created locally and settings are not right. It did let me install a new wordpress.
    What went wrong?

  45. Monique

    hello. thanks for this tutorial. but i have a problem at step 6. All first 5 steps are done. but when i reload my site after changing URL in database. there is no such message as “Error Establishing Database Connection error” and my site is still opening in local host. please help what i should do now

  46. Alex

    How to create MySql db on my actual site. My provider can help me?

  47. Miloš

    Hi, it is me again. Now I have a problem with step seven. I put that code with my own web page
    in my sql but 2 of five pages still don’t work. I propably didn’t understand your instructions very well. What do you mean by ”but don’t forget to change it with your own local site and live site URLs. ”?

    • Nadeem

      Hi
      could you please check your menu under the appearance and then click one by one those menu which is not working properly. hopefully you’ll find the errors.
      Nady

  48. Nikhil

    Hi,

    Thanks for the help…

    All the steps are working perfect….

    But When I am trying to login or Click on Any link….

    It show me following msg….

    My Website :
    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator at webmaster@ to inform them of the time this error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    What’s the solution of this error…

    • Dwayne Smith

      Hi NIKHIL I am having the same problem did you manage to figure out what the problem was. If so could you please let me know your solution

      Cheers
      Dwayne

  49. Mustapha

    Very helpful post
    thank you

  50. Milos

    I have a problem with step 6 since that I don’t know how to edit wp-config.php. The thing is that when I click right mouse and open view/edit there are no options for entering database name, user and password.
    Also in step 3 I uploaded my WP files in htdocs file because that’s the only folder that I see. I use FileZilla.
    I would appreciate very much if you could answer me on my email.
    Miloš B.

    • Andrej

      Milose… When you open wp-config.php file, you need to open it as a notepad document, and find at the beggining of the text database name, user and password, edit text manually and then save again.

  51. Matt

    I ran into an sql error 1064 when importing using a compressed export. Finally got it working by exporting as an uncompressed .sql

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。