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. Axel

    I love this entry, I use it as a checklist every time I make a migration.

  3. Gary

    I keep getting stopped at step 4. when I import my datatbase I get the following error

    #1231 – Variable ‘character_set_client’ can’t be set to the value of ‘NULL’

    I only have limited sql knowledge and never done anything like this before. any help/guidance would be greatly appreciated

  4. Andrew

    Hello,

    So I got to step 6 without any issues until my website failing to become live. I went into my wordpress general setting and my site url was still a localhost. Am I suppose to change the site url before I upload it into the ftp program and into my host, or can i leave that as localhost? Or, do i change the site url in wordpress after i’ve uploaded my files into my hosting site?

    This page was super helpful, thanks!

    • Daneesh

      Hi. Thanks so much for this, excellent tutorial. I seem to have got stopped at Step 6. I am still getting a “Error establishing database connection” error. DO i need to change the hostname field in the config.php too? and what do i change that to?

  5. Simon

    Amazing, it worked, thank you.

  6. sornanun

    Thank you very much.

  7. Annete Momanyi

    Thank you for the article. I have managed to sort my problem after following these steps.

  8. Arash

    Hello there,

    I have two questions and I’d be grateful if you could help me!

    1) Why do I have two ht-docs and wp-content folders inside my WordPress folder?

    2) When I move my WordPress website from a localhost to the live host, It’s possible to remove my localhost or should I keep it forever?

    Thanks in advance!

    • Matze

      1) By installing WordPress on your hosted server, these docs/folders will be automatically added. I think while uploading your files from local to live via FTP __ht-docs__ and __wp-content__ just weren’t replaced.

      But please check your local files which are normally located in the WAMP/MAMP folders unter __htdocs__ . Are there also two copies of the datas? Then you should find out, which one is the right one …

      2) At the time uploading your files from local to live, the local datas are a backup. After some weeks, changing and editing your live site on the server you can delete the locals.

      But you should create a backup regular and store the datas local (Quote: “If you are doing this on a regular basis, then we highly recommend that you get BackupBuddy because it will make your life easy. You will thank us for that later”)!

      Hope it helps :)

  9. Starfleet Nnaemeka

    Wow! What a wonderful tutorial , seriously i really appreciate the effort you guys brought out to write these tutorial. Thanks it really helped me to set up my website build on wordpress from localhost on wampserver.

  10. Leo Laroche

    i have followed all the steps, but when i type in my website the old website comes up. Can someone help me please.

  11. rachel asakome

    i have followed steps 1-5, but i am not sure where my site is. sorry it sounds really dumb but i am not great with technology. I have uploaded the files, but when i type in my website the old website comes up

  12. Justas

    server DNS address could not be found.
    ERR_NAME_NOT_RESOLVED

    I changed everything accordingly, but still can’t connect.

  13. Carrie

    Could you please explain on how to do this with webmatrix? I have a PC and my wordpress install on my local PC was with webmatrix. I do not have a MAC. Where on webmatrix do I export? I am confused about this. Also, you have create a db in cpanel my sql. Where do I save this new db? On the cpanel someplace or on my local pc hard drive and under what name? I have a domain with go daddy and a web hosting I purchased. They said to do a brand new fresh install of wordpress from there site…. why would I do this? I already have my wordpress via webmatrix on my local pc this is where the website I built resides. How do I get this on my web hosting? Confused on the db stuff and how to get my local wp files/db to my web host. Thank you.

  14. Neo An

    Very clear!
    Thank you very much!

  15. Milica

    This is a great tutorial. Thanks a lot! :)

  16. Amber

    I have followed all of these steps and when I view my site it is showing my content like words and links but none of the decorative stuff or plugins etc. My menus are showing up as just a list of words as if I created a page without any real CSS. My CSS files are not missing so I do not know where the mess up is happening. I tried to do the part about fixing broken links and I am not 100% of what I should put after the localhost part. I used the name of the folder that my entire wordpress database/files/etc are in. I cannot seam to figure out what is going wrong.

    • Abdul

      @AMBER and all those struggling with the same issue, the problem with the deployment process of WordPress’ database is due to the empirical replacement of your local URI with the live site’s URI as explained in this article at Step 7. If you just execute the UPDATE SQL statement as shown, you, most of the time, end up corrupting your database. Why? The reason is simple: WordPress has a way of serializing some metadata for its own convenience. This post explains it pretty well: nacin.com/2010/04/18/wordpress-serializing-data

      If you look at this array:

      array( ‘apple’, ‘banana’, ‘orange’ ),

      when serialized it looks like this:

      a:3:{i:0;s:5:”apple”;i:1;s:6:”banana”;i:2;s:6:”orange”;},

      where:

      – a:3 stands for “array of size 3”
      – i:0; i:1; i:2 stand for “integer index 0; integer index 1; integer index 2″ respectively
      – s:5:”apple” stands for “string, length 5, data=apple”
      – s:6:”banana” stands for “string, length 6, data=banana”, etc.

      As you can see, any serialized string is stored along with information about it’s length. So when you do a simple search and replace in your tables, all occurrences will be replaced indeed but the string’s length metadata won’t.

      In the case your local URL’s length equals your live site’s URL length, then you’re lucky; if they don’t match then you’re in trouble.

      The question now is: “How do I fix this?”. I’m happy to say that, fortunately, there are many plugins that can help you with this but one that’s really simple and good at it is “Better Search Replace”.

      Simply install this plugin in your local WordPress installation and proceed as explained in this article. The only place where you can safely replace your local URL is in the wp_options table as explained at Step 5.

      Once you’re done installing the plugin, in the admin panel, go to “Tools, Better Search Replace”, in the “Search” text box type your local site’s URL (e.g. http://localhost:12345) and in the “Replace with” text box, type your live site’s URL (e.g. http://www.example.com) and you should be ready to go. Just make sure you don’t include any trailing forward slash “/” in the URL (at the end like http://localhost:12345/ or http://www.example.com/)

      I hope this explanation was useful and please let me know if it helped.

      Happy coding!

  17. Simon

    Hi,
    Brilliant article and very easy to follow.
    However, as a WordPress virgin I am struggling with the whole concept of having a separate database from the website. I have created everything locally on my PC. But the local PHP Admin will allow me to use however many characters i like in naming my database but my remote server/host (123-reg) will only allow 9 (my original had 11) so…. the database name locally is different from the database name remotely. I have exported the database tables and imported them in to the remote database, renamed my wp-config to point to the new shorter database name with the correct user name and password but i am still getting the ‘Error establishing a database connection’
    message. Any suggestions?
    Could the fact that the tables are exported from a database with a different name from the one they are being imported to make a difference?

  18. Gabriel

    Hello I made all of your steps but I can see only a white page. It doesn’t notify me an error.

    I upload everything in a subdirectory of my website. It’s because of that? Is there a solution?

  19. Patrick Hasch

    Great article, if the upload of zipped files doesn’t work try uploading .sql files instead.

    • Tony

      I also faced the same problem.

  20. John James

    Hello. From your step 6, you said we should change database name, user and password. Are we supposed to change the hostname too?

      • John

        Step 3 says nothing about host names.

        • WPBeginner Support

          When you are creating a database on your webhost, you will be able to see the hostname. If you don’t then this means you are using localhost.

  21. Mohd Hasan

    i followed all steps but going to install.php page , someone can help me , i really need your help

  22. Gabor

    Hello!

    i have 500 internal error on server.
    I think the problem is with .htaccess.
    Can u help in this?

    • Dawn

      I am having this same issue. I followed every step exactly, I fixed the wp-config.php file and re-uploaded it, but now when I go to my live site it says,

      “This page isn’t working

      [my site] is currently unable to handle this request.
      HTTP ERROR 500”

      • Dawn

        I should have said that that is the error I get when I try to go to my wp-admin. When I go to the site itself it’s blank. :(

  23. Axel

    The solution for image references is to execute the following scripts on your DB:
    (I can’t write the real scripts because wpbeginner.com thinks I’m doing SQL injection :\ )

    UPDATE wp_posts to set the value of column guid to the value of function REPLACE(guid, ‘http://old.site.url’, ‘http://new.site.url’)

    AND

    UPDATE wp_postmeta to SET the value of column meta_value to the value of function REPLACE(meta_value, ‘http://old.site.url’, ‘http://new.site.url’)

    Also don’t forget to check permissions for wp-content/uploads to ensure you can add more images.

  24. Aimy

    Hi,

    Thanks for this. I did everything as you described. It seemed that everything went well apart the front page that shows nothing but just the navigation menu.
    When I go to the page builder of the front page it shows that there is nothing added there.
    Any advice?

  25. Krishna

    Dear wpbeginner owner

    Its working for me !

    thank you very much!

  26. Philippe

    Damn I’m so lucky wpbeginner exists, I’ve finally managed to get my website to work thanks to this post, I had to fight my way trough (there is an older database-version on my webhosts server) but I did it thanks to you guys!

  27. Umai Hassan

    URL Changing
    I have changed the URL in wp_option table but only home page loads correctly other pages links are still set to localhost/something ??
    What should I do to change all links??

  28. Cos

    Brilliant article – thanks! Got through the process without a hitch first-off :-)))

  29. Dan Odaka

    Hey, after doing all that, when I go to my site I get a page that shows me the index of wordpress and not my site. what do I do?

    • WPBeginner Support

      This could happen due to an incomplete file transfer. Try to upload your WordPress files again.

      管理者

  30. Sonja

    Hi. thank you very much for this post. It seems to be very helpful and I’ve tried to follow every step, but now that I’m done, when I go to my URL I get a “Server not found” error (The host shows me a preview with “under-construction” and their logo, which was online before I uploaded the data and database – shouldn’t I at least get that?). Do you have any ideas where I might have gone wrong, and is it best to delete everything and start again from scratch, or overwrite it, or look for any particular errors?
    Thank you for any help!

  31. Hugues Pinsonneault

    im wondering if you have any recommendation for developing locally new functionalities on a local dev install, while the client can still do updates on the real database.

  32. shah

    Hi
    Thankyou for the details, but i am still not able to get the path of images correct inspite of the changes done … i have my folders in public_html and have my db created …my live website is working fine except for the pic / logos

  33. zarna

    My wordpress site went live but my images are not getting replicated and they aren’t visible. Can you please guide me what should be the images folder structure while uploading it to live ??

    Your help and guidance would be appreciable.. Thank you.

  34. Coil McCoy

    Great post !!!
    Only the last part doesn’t worked for me, the pictures and links still missing !
    Any clue?
    thank you

  35. Vinish Chaudhary

    Hello,
    All great beside this You don’t have permission to access / on this server.Don’t know why it is showing when I try to access my site.I have done all steps like you said but getting this error can anyone please help me to solve this problem.

  36. Sudais

    Instead of this long way,I use a plugin called wp all in one migration,I just need to import a single file using a plugin when I go live and all done,no playing with databases,etc.I think everyone should do that saves alot of time and handywork.

    • hiren

      can u put the demo ..

      thanks.
      hiren patel.

  37. Paul

    Great article ! But I’m still stuck at the last step. Images aren’t showing on my website.

    Well in fact they does, but only on my PC. Everybody else is getting a buggy website.

  38. Farooq Bashir

    Wow .. Great Article sir
    Its Perfect Working.
    Thanks

  39. Bikram Ray

    Hi,

    No doubt; a very useful article. But I got stuck in the last step. I ran the SQL update query but still having issues regarding image path.

    Just one thing; while uploading the file through FTP, I did not upload the wordpress folder (the test folder) rather I uploaded whatever inside it.. So in the server there is only the folders and files directly placed under ‘public_html ‘

    Regards,
    Bikram

  40. Kay

    DIDN’T WORK!!

    Error
    SQL query:


    — Database: `wordpress`

    CREATE DATABASE IF NOT EXISTS `wordpress` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    MySQL said: Documentation

    #1044 – Access denied for user ‘ksalim’@’localhost’ to database ‘wordpress’

  41. Damilola

    A very awesome article, it really made a project i was working on for a client already on my local machine easy to move to his server, i mean i literally tried to develop the website all over again and it was such a pain in the ass….Thank you

  42. Tim Vincent

    Thank you so much for this guide. I struggled doing this for some time before finding this. I followed it word for word and all seems to work. I am very grateful!

  43. sonu

    hello! syed

    i want to ask you to from where i get the best free wordpress simple attractive theme which laterly i planned to upload on the live server….any help would be much appreciated….thanks…

  44. sonu

    hello! syed

    i want to ask you when we upload the worpress site from locahost to live server….i just want to ask the wordpress having lot of files and inside the wp-content/themes/… having three different types of theme like twenty fourteen,twenty thirteen ,so is it needed to upload all these themes or not….help would be much appreciated…..thnks…..

    • Ridhik

      No,u just upload the theme folder that currently activated in your site.

  45. Andres Paz Soldan

    Thank you! This was very useful!

  46. Lellys

    First of, thank you!

    I did everything and my site is working, but when I need to login on my wp-admin, it show me a blank screen and nothing happens. Any idea?

  47. paddy lutaaya

    thank you for this article i have followed the steps and uploaded my website to c panel but it has failed to work it brings internal error please help me solve this thank you

  48. Phillip Pilkington

    Allgreat advise except step 6. I have not got past this stage, the advice is not clear. My website shows the Error Establishing Database Connection. This next part doesn’t explain anything to me.
    “To fix this, connect to your website using an FTP client and edit wp-config.php file. Provide the database name, user and password you created earlier in Step 3. Save the wp-config.php file and upload it back to your server. Visit your website, and it should be live now. ”

    I am connect via ftp, then just edit the file….no, nothing happens from here.I open the file in aneditor but I don’t make any changes because it does not show anything about whatis expalined.

    Regards,

    • Tyler Hall

      Hey, I am currently transferring the files as we speak. Not sure if you found a solution yet (hopefully you have its been 15 days) but you should probably change the hostname: /** MySQL hostname */
      define(‘DB_HOST’, ‘ ‘ your hostname before should have been your localhost or similar.

  49. Himanshu

    Thanks for the post. Really helped solve my problem. Although I faced some issues with database importing. After much effort, updating the phpmyadmin version fixed it for me. If possible you could also include common errors in each section, so that a beginner doesn’t get lost. As it happens, most likely you are going to face some error here and there. Other than that great post. Thanks.

  50. Ola

    Hi,

    Thanks for this, the steps are so direct and you made WordPress uploading fun.

  51. Andy

    Hi. When I go to my website it says Welcome to: yourwebsite.com
    This Web page is parked for FREE, courtesy of GoDaddy.com. Do I have to register my domain? I just thought of a random website name to put in for the changing site url step 5. Also when I enter the local host site I get the message the webpage could not be found. What should I do?

返信を残す

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