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データベースを手動でバックアップする方法(ステップバイステップ)

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

バックアップは最も重要なセキュリティステップでありながら、サイトオーナーが最も軽視しがちなものだ。

WordPressデータベースを手動でバックアップすることは、WordPressのデータをすべてダウンロードする手軽で簡単な方法です。WordPressサイトの完全なバックアップではありませんが、WordPressサイトの復旧には便利です。

この投稿では、WordPressデータベースを手動でバックアップする方法を紹介する。

Making a WordPress database backup manually

このチュートリアルで扱うトピックの概要を簡単に説明します:

WordPressデータベースの手動バックアップのタイミングと理由

サイトには必ずWordPressのバックアップシステムをインストールし、設定する必要があります。これにより、何か問題が発生した場合にサイトを復元することができます。

データベースを手動でバックアップする必要がある場合がいくつかあります。

例えば、WordPressサイトに大きな変更を加え、念のためデータベースのバックアップを取りたい場合などです。

サイトの管理エリアにアクセスできるのであれば、プラグインを使ってオンデマンドでデータベースのバックアップを取ることができる(どのプラグインをどのように使うかは、この投稿の後半で紹介する)。

一方、WordPressサイトの管理エリアにアクセスできない場合もあります。

例えば、WordPressのサイトがハッキングされたり、WordPressのエラーでアクセスできなくなったりした場合に起こります。

このような場合は、データベース管理ユーティリティを使って完全に手動でバックアップを取る必要があります(その方法も紹介します)。

手動でのデータベースバックアップは、プラグインによって作成されたデータベースバックアップとまったく同じです。

それでは、WordPressデータベースのバックアップを手動で簡単に作成する方法を見ていきましょう。

1.プラグインを使ってWordPressデータベースをバックアップする

この方法は簡単でお勧めですが、WordPressサイトの管理エリアにアクセスできる場合にのみ有効です。

まず、Duplicatorプラグインをインストールして有効化する必要があります。詳しくはWordPressプラグインのインストール方法のチュートリアルをご覧ください。

注: Duplicatorには無料版もあり、データベースのバックアップを作成することができます。有料版にアップグレードすることをお勧めします。

有効化した後、Duplicator Pro ” パッケージページに行き、’新規作成’ボタンをクリックする必要があります。

Create new package in Duplicator

次の画面で、Duplicatorはバックアップに含めるものを選択できます。

データベースのみ」を選択し、「次へ」ボタンをクリックします。

Database only package

DuplicatorはWordPressサイトとデータベースをスキャンします。

その後、スキャン結果が表示されます。データベースセクションの横に、データベースのみのパッケージを作成していることを知らせる表示があるかもしれません。

Scan complete

ビルド」ボタンをクリックして続行する。

Duplicatorはバックグラウンドでデータベースのバックアップを準備し、進捗状況を表示します。

完了すると、バックアップファイルをダウンロードできるようになります。アーカイブファイルとインストーラファイルの両方をダウンロードすることをお勧めします。これにより、サイトをより簡単に復元することができます。

Download backup files to your computer

2.phpMyAdminを使ってWordPressデータベースを手動でバックアップする

この方法では、phpMyAdminを使用する。これはオープンソースのソフトウェアで、ウェブベースのインターフェースを使ってMySQLデータベースを管理することができます。

phpMyAdminはほとんどのWordPressホスティングサービスにプリインストールされています。

この投稿では、Bluehostのスクリーンショットを示します。しかし、基本的な手順は、ほとんどのホスティングサービスと同じです。

まず、WordPressホスティングサービスのコントロールパネルにログインし、ウェブサイトの下にある「設定」ボタンをクリックします。

Bluehost site settings

サイトの設定で、クイックリンクセクションまでスクロールダウンしてください。

次に、「phpMyAdmin」ボタンをクリックして続けます。

Launch phpMyAdmin

新しいブラウザータブでphpMyAdminアプリが起動します。

ここから、左の列からWordPressデータベースをクリックして選択し、上部にある「エクスポート」ボタンをクリックします。

phpMyAdmin export database

エクスポート方法を選択するよう求められます。

次に、「カスタマイザー」を選択する必要があります。カスタマイザーを選択すると、より多くのオプションが表示されます。

カスタマイザーを設定すると、WordPressデータベース内のすべてのテーブルが選択された状態で表示されます。

WordPressプラグインがデータベースに独自のテーブルを追加することがあります。エクスポートから除外したいテーブルがあれば、選択を解除することができる。よくわからない場合は、すべて選択したままにしておくのがよいでしょう。

Select and exclude tables

次に「出力」セクションまでスクロールダウンする必要がある。

初期設定では、phpMyAdminはエクスポートプロセスの出力をテキストで表示します。

Save output to a file(出力をファイルに保存)』オプションを選択して変更する必要がある。

圧縮については、zipまたはgzipオプションを選択する必要があります。

Select database backup output

phpMyAdminは、データベースのエクスポートをzipまたはgzipファイルとして送信します。

これですべてです。これでWordPressデータベースの手動バックアップは完了です。

3.cPanelからWordPressデータベースの手動バックアップを作成する

ほとんどの優れたWordPressホスティングサービス会社は、オンデマンドバックアップをダウンロードする簡単な方法も提供しています。ここでは、ホスティングサービスダッシュボードから手動でWordPressデータベースのバックアップを作成する方法を説明します。

BluehostSiteGroundHostGatorなどのホスティングサービスプロバイダーには、すべて同様のオプション設定があります。

このチュートリアルのために、我々はあなたにBluehostのスクリーンショットを表示します。しかし、基本的な手順は、他のホスティングサービスのために非常によく似ています。

まず、ホスティングアカウントのダッシュボードにログインし、サイトの下にある「設定」ボタンをクリックします。

Bluehost site settings

次の画面では、「詳細」タブに切り替える必要があります。

ここから、cPanelセクションまでスクロールダウンし、「管理」ボタンをクリックするだけです。

Bluehost advanced cPanel

これにより、新しいブラウザータブでcPanelインターフェースが起動します。

ここから、ファイルセクションまでスクロールダウンし、「バックアップ」ボタンをクリックします。

cPanel backup

バックアップのページで、部分バックアップのセクションまでスクロールダウンします。

ここから、データベースのバックアップファイルをダウンロードするには、データベース名をクリックする必要があります。

Download cPanel database backup

必要であれば、このページからWordPressファイルのバックアップをダウンロードすることもできます。

WordPressデータベースのバックアップを復元する

WordPressデータベースのバックアップをダウンロードしたら、ハッキングされたWordPressサイトの修復を続行したり、必要な変更を加えたりすることができます。

多くの場合、バックアップからサイトを復元する必要はないでしょう。

しかし、万が一のために、バックアップからWordPressを復元するための詳細なステップバイステップガイドをご用意しました。データベースのバックアップからの復元を含む、WordPressの一般的なバックアップオプションをすべて網羅しています。

将来のために適切な自動バックアップシステムを構築する

WordPressデータベースのバックアップを手動で作成することはできますが、これはWordPressサイトの適切なバックアップソリューションに代わるものではないことに留意してください。

WordPressのデータベースにアクセスできない場合があります。例えば、ホスティングサービス会社がお客様のアカウントを停止したり、サイトのデータを紛失した場合などです。

もうひとつ考えられるのは、ハッカーがWordPressのデータベースに悪意のあるコードを注入した場合だ。感染したデータベースをクリーニングするのは、かなり難しくなります。

そのため、WordPressデータベースのバックアップを自動的にクラウド上に保存する適切なバックアッププラグインを使用することをお勧めします。

Duplicatorの使用をお勧めします。Googleドライブ、Dropbox、OneDriveなどのクラウドストレージサービスに自動的にバックアップを作成し、保存します。

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$編集プロセスをご覧ください。

Avatar

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

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

  1. Syed Balkhi says

    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. Mrteesurez says

    When I used Duplicator, free version to backup my site, do I still need to backup database separately when I have done a complete backup of the files ?
    Isn’t a database not included ??

    • WPBeginner Support says

      The free version includes the database so you would not need to worry about that.

      管理者

  3. Prajwal Shewatkar says

    Backup is the only solution to achive ultimate security. No matter how much you try someday you’ll have security issues on website and only backups can save you. I recommend daily full backup.

    • WPBeginner Support says

      It would depend on how often content is added to a site for how often backups should be ran but they are great for keeping a site safe :)

      管理者

  4. Jiří Vaněk says

    I use phpMyAdmin for exporting the database. When I use a plugin, can I rely on the resulting backup being as comprehensive as using phpMyAdmin?

    • WPBeginner Comments says

      Yes, it should copy the whole WordPress database. It can actually be more comprehensive, because it can also include things like images and media.

      • Jiří Vaněk says

        Thanks a lot for the confirmation. So I will probably switch to an automated backup with the help of a plugin.

  5. Moinuddin Waheed says

    I am getting stucked with the import file of the database in phpmyadmin of the local xampp server.
    I wanted to make a test site for a live website, I followed the steps mentioned above but when I am importing the database file, it gives an error Maximum execution time of 300 seconds exceeded”
    and it doesn’t proceed further.
    is there a way I can solve this issue?

  6. Moinuddin Waheed says

    I have done manual backups many times and was unable to restore the back up database files in the liver server.
    Having said this, is there any method which can ensure full back of everything like themes , settings and database all in one?
    if this can be achieved, it would be very easy to restore any website without losing anything.

  7. A Owadud Bhuiyan says

    Manually backing up the database is incredibly useful, especially when testing plugins locally.

  8. Richard says

    What is the difference between a database backup and a site backup performed by a plugin such as Duplicator Pro?

    • WPBeginner Support says

      It varies from plugin to plugin but normally a site backup includes the theme and plugin files while a database backup is for your content.

      管理者

  9. Rafal says

    I dont see any Backup Buttons on my Bluehost account: there are only tabs: Home, My sites, Marketplace, e-mail, domains, advanced

  10. Rose says

    If I have a premium or business wordpress site, then wordpress is my host, correct? What can I do from wordpress.com besides an export?

  11. tim says

    Hi. I have all folders from a wordpress site but i dont have any database backup. Is it possible to restore drom folders without sql backup?

  12. David John says

    I have Finished the given all the steps, but i can’t backup my site, it shown be a Sever Error…And How to Rectify this error….

    • WPBeginner Support says

      Not a good idea. The export file will be able to import your comments and posts into WordPress. However, it will not be able to import images if they have been removed or lost from original server. It will also be unable to restore any other data stored in WordPress database.

      管理者

  13. Syed Azad Shah says

    Dear Syed,
    Many thanks for your wonderful posts. They are really doing miracles for me. Just one question – I have four or five sites running on one hosting account. One from main directory and rest from sub-directories. How do I go about backing them up all. My website is
    Should I back them up as one file or different files

    Thank you very much
    Azad

    • WPBeginner Support says

      Depends on your setup. If all of them are using the same database, then you can select tables for each site and then export them. Repeat for the next site.

      If they are using different databases then you need to export in different files.

      管理者

  14. Ahmed LAHMAR says

    Hi WPBeginner,
    I use WP-DBManager and i would recommend it to anyone who wants some peace of mind it’s a wonderful plugin that you can backup your database, compress it into .gz file (my 70 mb SQL file became 5 mb after compression) and email it to you as schedueled. You can choose daily and weekly backup or you can do the backup manually.

    The plus other featues like optimisation which you can scheduel as well

返信を残す

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