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

    Some days ago I posted I had used method #1 successfully. I am now trying again, from scratch, with no success.

    I have two webs in one host (two subdomains: www and blog). one seats in /public/ and the other seats in /public_blog/.
    (so, not a subfolder but a sibling, in my host provider). Both (www and blog subdomains) have a SSL.

    I got to enter the WP admin area, clean the remaining files; posts and pages are listed, but clicking preview shows a blank page. No errors on the log

    I don’t know how to trace and find out the steps (although I have the dup-installer-log.txt

    thanks

    • WPBeginner Support

      You would likely want to reach out to your hosting provider to ensure that the subdomain is set to the correct folder location for the most common reason for that issue.

      管理者

  3. Rob H

    Brilliant tutorial.

    I went with option 1. Got write through to point 4, but then on trying to launch WordPress, I received a “too many redirects”. Spent ages trying to figure out what I had done wrong, trying all the suggested for the error type and turned out not to be my fault. It wasn’t working because the database version I was using on Wamp was newer than the version on my hosting company 1and1 ionos.

    I called up 1and 1 CS’s to ask if they could update the database version and it appears they must have had other complaints. 2 days later, database version updated and my local website transferred to the live site within minutes.

    So…… database versions is another thing to consider if you get problems.

    Thanks for such an excellent tutorial, I will use this method again in the future.

    • WPBeginner Support

      Thanks for sharing your solution should anyone else run into this issue :)

      管理者

  4. Antonio

    Perfect. I used method #1. Now the site (in server) is up and running.
    But, then, when I add some posts, pages, menus in localhost,… how can I update the real site, without starting from scratch again?
    thanks

    • WPBeginner Support

      You could use the duplicator method to move the updated content over to your current site

      管理者

      • Antonio

        Thanks. I will try.

        I didn’t notice my post was published yesterday, so I just wrote a new one asking the same question.
        Sorry for the inconvenience.

        • WPBeginner Support

          No worries :)

  5. Bahadur

    My website working fine on localhost but when i upload it to my live domain some of the Social button images are not showing can you help please ?

    • WPBeginner Support

      We would first recommend reaching out to the support for the plugin you are using to ensure there isn’t a hiccup that is specific to transferring the content.

      管理者

  6. Luisa

    Hi! I followed every step but once I get to step 4 and click on Admin Login I get an error saying “Too many redirects occurred trying to open […]. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page”.
    How can I fix that?

  7. Anita Steen-van Meerveld

    Hi, I’ve followed the instructions so far, and everything seems to go as it has, but the problem begins on step 4.
    I’ve uploaded the migration files, after check the file is 1.2 gig.
    After launching the installer.php the message is : file is 4k, please upload the complete file.
    I am sure that the uploaded file is completely uploaded.
    The process stops here, what can I do?

    • WPBeginner Support

      You would want to reach out to duplicator’s support and let them know the error and they will be able to assist.

      管理者

  8. Jessica

    Thankyou for this fantastic tutorial! I am building a new website locally but I already have a live site running that I will want to completely overwrite with the new one. Do I need to delete my whole live website before migrating? Both are running WordPress but are completely different themes… thanks!

    • WPBeginner Support

      It would normally be best to remove the site you are replacing so you do not have unnecessary additional files on your server.

      管理者

  9. nurudeen

    In my opinion I recommend you guys to please organize a complete video tutorial, it gonna be a great practical guide and more helpful and much easier, for it may allow to view in real doing until results achieve.. Thanks you guys for good job you are offering.

    • WPBeginner Support

      Thank you for your recommendation :)

      管理者

  10. Reggie

    Hi, I did this and now my slider/carousel does not work live but it shows and works on localhost. What can I do to fix this? Thank you.

    • WPBeginner Support

      It would depend on what error you are running into at the moment. If you reach out to the slider plugin’s support they should be able to assist.

      管理者

  11. Gage

    Hi I really appreciate the in depth explanation. I am completely finished with step 5, changed my URL and Home to my actual URL i am using, but now when I type in my URL it still gives me the “if you are the owner login to launch site”. Not sure what I’m missing but i dont get an error message.

    • WPBeginner Support

      Hi Gage,

      Please recheck if you uploaded WordPress files to the correct directory. If you are unsure, then ask your hosting provider and they will let you know which directory you should upload it to.

      管理者

  12. Vladimir

    Thank. Very useful tutorial.

    • WPBeginner Support

      Thank you :)

      管理者

  13. Tarun Bisht

    Thanks for sharing the post, i will surely try.

    • WPBeginner Support

      Glad our post can help you :)

      管理者

  14. Hazel beaver

    I normally love your tutorials and have built my two personal websites with your help and guidance… But this is too complicated for me!
    When I run Duplicator If doesn’t list all the entries as ‘good’. The size check and add on checks come back as having a warning. so I can’t get any further. My site isn’t that big.. but I think it’s trying to package everything ( including back-up and plugins that I assume I don’t need to migrate. Is there a way round this ( I’m trying to down load my live site to WAMP so I can work on using a new theme )

    • WPBeginner Support

      As long as they are only warnings you should be able to continue, if you click on the section with the warning it should let you know different options on how to change from warning to good. You can also enable filters to ignore certain files/folders

      管理者

    • WPBeginner Support

      Thank you :)

      管理者

  15. Ravi gupta

    Great! Thanks for sharing this information I am so very happy to read this information

    • WPBeginner Support

      Glad you like our article :)

      管理者

  16. Rosa

    Hi there! I’ve followed your instructions so far, and everything seems to go as it has, but I’ve stuck on Step 6.
    I read: “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.”
    Can you please be more specific? Where exactly do I find wp-config.php file and how do I edit it?

    • WPBeginner Support

      You would find the wp-config file where your WordPress folders are which is normally in the public_html or www folder of your hosting. You would use a text editor such as notepad or similar to edit the content of the file

      管理者

  17. Hirr

    Could be more helpful if you uploaded a video..

    • WPBeginner Support

      Thank you for your recommendation, we’ll certainly take a look for a possible video :)

      管理者

  18. Mike

    “Click on the Import tab in the top menu. On the import page, click on Choose File button and then select the database file you saved in Step 1.” I cannot locate this file – no idea where to even look.

    • WPBeginner Support

      Hi Mike,

      In the first step you would have saved a file to your computer. This is the file you need to import here.

      管理者

  19. Samad

    Thank you very much for the information,

    I have been doing these wrong in the past.

  20. Jim Thorne

    Fantastic how-to article. I followed it and easily migrated my site from localhost to the live server. Thanks for posting! I’m a newbie at moving a site, so I had to figure out some of the simplest things. One thing I had to discover was how to move the file folders from my computer to the host server using cPanel. After researching this, I discovered to ZIP the entire folder with all of its subfolders into a ZIP file and then upload that one file.

  21. Christian

    Fix Images and Broken Links by Updating Paths: How to update background images? The method mention in step 7, only work normal image not background images. So how to update images?

  22. Alex

    Hi guys, great tutorial.

    But when i try to access my site through the url, it asks me to re-install WordPress (i mean is shows me the wizard of the WordPress when it starts)

    Plus, when you say go to the database and create a new user, mySQL doesn’t have an option.

  23. Olaniyan

    Hello please i followed all the steps but at the end of it all am getting an error message stating Erro In Establishing a database connection message

  24. Steph

    Hi, how do I proceed if there is no cPanel? Thank you in advance!

  25. Jasonas

    Hello! Great article. Just two things that I think would be cool to read on this subject.
    1.Are there any tips of workflow in order to avoid the broken links, images etc. that you mention?
    2.Also, I’ve read plugin reviews where users claim that some bad plugins will leave “trash code” (unusable code and files) after the uninstall/deletion of the plugin, which eventually makes their website slower. Is that true? If yes how could we, as beginners, detect that “trash code” (essentially the leftovers of plugins that we deleted) and remove it?
    In my local website I try many plugins that I don’t intend to use and will end up deleting (like many others do), so I am interested in this.

    Thank you in advance.

    • WPBeginner Support

      Hi Jasonas,

      1. You can follow the steps above in order they appear to avoid broken links.

      2. You can view leftover data in your WordPress database by using phpMyAdmin. However, we don’t recommend beginners to do that unless they are certain that this data is slowing down their website.

      管理者

  26. Sally

    Hi,

    I have been building my site on the local server, I now want to move it over to a temporary Url on my WordPress which is installed on my hosting package to finish and then once ready it will be pointed to the domain name which currently hosts the old site, I have attempted the above steps but I get as far as step 1 and have no idea where the export file goes?
    Sorry if this is a silly question but can’t seem to find it anywhere!

    Any help would be much appreciated.
    Thanks,
    Sally

    • WPBeginner Support

      Hi Sally,

      Export file is automatically downloaded to your computer. Check your computer’s Downloads folder or any other folder where your browser usually stores downloaded files.

      管理者

      • Sally

        Hello,

        Thanks, sorry can’t find it there at all. I emptied the folder and did it again but nothing appeared in there at all, hence asking the question.

        All Safari downloads go into the normal download folder, so don’t know where it could be going. Going to give it a go with Duplicator and see if I get any further!
        Thanks,
        Sally

        • Sheuen

          I think maybe you can try choose download custom instead of download quick, and then in output field, choose “Save output to a file” > Compression: > gzipped

    • JD Simpkins

      Depending on your setup, it may not automatically download. It may open up in a new screen and you can then copy/paste it into a file and save yourself. Not sure if this is just a MAMP thing or what but when I migrated over to working on a Mac, this part of the steps changed.

  27. Sally

    Hi,
    Your tutorials are great, thank you!

    I have just been following this thread and not sure if what I am doing is wrong but I do Step 1 (Export) but no idea where the file that I am exporting goes?
    I am running a local server on my Mac and have got stuck here, am I missing something?
    I am trying to get my website from the local server to WordPress running on my hosting package with 123 Reg. This is going onto a temporary URL until I am ready to move onto the domain which has currently got the old website on it.

    Any help will be much appreciated.
    Many thanks
    Sally

  28. Ahmad Lone

    Thank you so much.

  29. Ismail

    I have a wordpress website on live server, i want to replace it by another wordpress server that i created on localhost, i want to keep the same host and same domaine name. what should i do please ?

  30. Sandy

    This is very helpful. I want to ask about the next step. What if I continue to develop locally and want to sync changes from time to time ? Do you have a tutorial for that ?

  31. DEAN O

    I have an issue where my laptop died with localhost MAMP server. I have been able to extract the all the files from the hard disc but I can’t run a database export.

    I have an laptop set up with XAMP.

    Any thoughts?

  32. Mauricio

    Sunday evening.
    The client wants the website.
    I have tried Duplicator all day long, no way.
    Problems with PHP and DB, just doesn’t work… until I get to your post.

    Back to basics man, manually put the live on air.
    Thanks for sharing.
    Its the simpler idea yet we try to automate things and get less work done sometimes.

    Had to share with you my truly akcnowledgment.
    Nicely done :)

  33. Stefan

    Thank you! This guide is perfect. I use it every time I forget how I move wordpress from local to live! :D

  34. Chell

    I have recieved a complete WP “filesystem” through an FTP server from a supplier of mine, and I want to creat a new webpage with these files, but with my own domain.
    Can I use this “walk-through” for this?
    Sorry silly questions, but I have only worked on WP through a cloud solution

    • WPBeginner Support

      Hi Chell,

      You will also need the WordPress database not just the files. Once you have both database and WordPress files, then you will be able to upload them to your own domain name and import the database.

      管理者

  35. Scott

    Hello. I have finished building my site on a local server and ready to move it to my live server. I am assuming that before I follow your steps, that I would need to install WordPress on my hosting account first. Is that correct? And if so, should I click the box that says “Automatically create a new database for this installation” ? If I do that, I will need to replace that database with the one from my local server, right? Or should I leave that box unchecked since I’m about to migrate a new database to it? Thanks.

    • WPBeginner Support

      Hi Scott,

      No, instead of installing WordPress you will be moving one from your local server to the live site. Similarly, you will export your local database and then import it on your live server’s hosting account using phpmyadmin via cpanel.

      管理者

  36. Bryn Why

    Hi, after updating my wp-config.php file to reflect the database information, I am now presented with the below when accessing the live site:

    Fatal error: Class ‘WP_Widget_Media’ not found in /home/…/wp-includes/widgets/class-wp-widget-media-audio.php on line 17

  37. Manos Liakos

    Dude, you are a life saver. That thing with the SQL query to change the links just saved me. I’ve been trying for 2 days straight to fix the site not displaying properly when accessing it from public ip through my domain name, even if “siteurl” and “home” were correctly configured. Thanks!

  38. Shreshta

    Thank you in advance.

    I have to upload the word press website from my local machine to the web server my company owns which sits in the same building as I work. My problem is I am not using any hosting services so I am not sure what to do when it comes to the file manager step for the database transfer. Just to be clear, how would I go if I were to upload the website from my local machine to the private company server without using a web hosting service.

  39. Dimitris

    Hello I am going to do this migration, but I have a question. What happened if i have to upload a website to a server but in my localhost this website is a part of multisite? How can I isolate this website from the local WordPress Network and finally upload it to a real web server?

  40. Olumide

    phpMyAdmin – Error
    Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.

    session_start(): open(SESSION_FILE, O_RDWR) failed: No such file or directory (2)
    The above is what i get and my site is not working please help.

    • WPBeginner Support

      Hi Olumide,

      If the error occurs on your live site, then please contact your hosting provider. If this happens on your local server, then this means your local server set up is not properly configured.

      管理者

  41. Angela

    I just followed these steps to move a local site to active and none of my local site transferred over.

  42. Olakorede O

    Please i am having issues with step 7. i imputed the life site but what will i put for the local site? thanks

  43. Dimitri

    Thanks god for this article !

    The Step 6 saved my life, it could not be found anywhere on the internet !!!

    Kisses from France

  44. Marlon

    Hi WPBEGINNER SUPPORT et al,

    Thanks I have found your article helping people out there. I hope I can find your favor to my problem. After having modifies by adding codes in functions.php (live site) i can’t view or access the website anymore, it always shows the message saying:
    Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /home/dh_awey63/website/wp-content/plugins/nextgen-gallery/nggallery.php on line 92
    ParseError thrown

    syntax error, unexpected ‘ang’ (T_STRING)

    I used to searched in google the message error and got some advices to access it thru FTP FileZilla client, but I can’t login successfully I always got an error in: “Response: 530 Login incorrect”. “Error: Critical error: Could not connect to server”. Is there a way i can edit the functions.php file to delete my comments there and put back the site in normal, I just don’t know if the web developer have configured ftp account, that freelance developer left his messy and lousy stuff in his web design and has gone out after he receives the payment. I am really new to this area and don’t know what to do. Please help. Thank you very much.

    • WPBeginner Support

      Hi Marlon,

      You can also access your WordPress files using the File Manager in cPanel under your web hosting account dashboard. Once you are connected to your site using file manager, you need to locate your functions.php file and undo the changes you made earlier.

      管理者

      • Marlon

        Hi WPBEGINNER SUPPORT,

        Thank you for your prompt reply. I sad I really have no idea if the guy who build the site created a cpanel account, I really don’t know the login details if there’s any. That bad guy never replies my messages after he receives the money from us. Please help me what to do if there’s any available options. Please visit the website at rheumacares.ph. Thank you very much.

  45. Victor

    Hi, I’m with a problem in step 4. After importing my database I get an error message. I don’t now what I did wrong in the process and I don’t know how to fix it. Could you give me some advice? I’m posting the error message below

    Thanks :)

    Error
    SQL query:


    — Database: `meusite`

    — ——————————————————–


    — Table structure for table `wp_commentmeta`

    CREATE TABLE `wp_commentmeta` (
    `meta_id` bigint(20) UNSIGNED NOT NULL,
    `comment_id` bigint(20) UNSIGNED NOT NULL DEFAULT ‘0’,
    `meta_key` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
    `meta_value` longtext COLLATE utf8mb4_unicode_520_ci
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci
    MySQL said: Documentation

    #1050 – Table ‘wp_commentmeta’ already exists

    • WPBeginner Support

      Hi Victor,

      The table in your database already exists. If you do not have any content on your live site, then you can simply DROP all tables in your WordPress database and then try to import again.

      管理者

  46. Jonathan

    Thank you for a fantastic article!

    I have locally built a wordpress site which I would like to replace a site currently live online.

    If I want to upload the local site to a test environment online, am I able to do this without the need to setup a new database? i.e. am i able to share the same database being used by the live site? If so how can I do this?
    Cheers, Jon

  47. Jon

    Fantastically helpful article thankyou! I have been building a wordpress site locally to replace one that is hosted online.

    I would like to move the locally hosted one to online in a test environment so that it does not replace the existing site.

    You instructions suggest that I need to setup a new SQL database for which I will incur charges. Is there a way that I can upload the test site to the existing database without disturbing the live site? If so how?

    Thanks,
    Jon

    • WPBeginner Support

      Hi Jon,

      It is not recommended, but you can change the table prefix in the wp-config.php file of your test site to something unique. Use the same MySQL database as your live site. Doing so your live website’s database will have tables for different WordPress installs.

      管理者

  48. Jojo Esposa Jr

    Can I use the Cpanel Softaculous installation of WordPress, then simply upload the sql database and the current theme I used? Uploading the entire wordPress files from my laptop to the live site using ftp takes very long since my internet connection is extremely slow, (2 mbps).

  49. Lyada Emmanuel

    Hello i followed all the steps ,however when i open login page to wordpress i get this
    Internal Server Error

  50. Madison Duncan

    Hello,

    I am confused by step two. When I click on my FTP client account it prompts me to use Cyberduck, but then I am not sure which files to upload or where (how to I make sure it is on public html?). I completed step one, so are those the files that I am supposed to upload? I just don’t see all of those anywhere. Thanks!

    • WPBeginner Support

      Hi Madison,

      This tutorial is about moving a WordPress website built on local server (Your computer) to a live website. If you have a local server installed on your computer (programs like Wamp, MAMP, XAMP), then you will find local files on your computer. These are the files you need to upload.

      The first step only exports your database. You will need it in Step 4.

      管理者

返信を残す

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