0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

LocalでWordPressサイトのデータベースをインポートする際に発生するFatal error: Allowed memory size ..の対処

Last updated at Posted at 2025-04-06

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 200357520 bytes) in...

AdminerEvoでSQLのファイルをインポートしようとした結果、
上記のエラーが出て先に進めない。

All-in-One WP Migrationも高くて使えず、少し格闘したので備忘メモ。

解決策(Mac版):

Adminerの「サーバーから実行」でインポートを実施した。
手順は以下の通り。

  1. Finderで以下の階層をひらく
    アプリケーション > Local > (右クリックで)パッケージの内容を表示 > Contents > Resources > extraResources > adminer

  2. SQLのファイルを設置
    上記の階層(adminer.phpと同じ階層)に、インポートしたいsqlのファイルを設置。
    このとき、adminer.sql または adminer.sql.gz(gzipの場合こちら)と名前をつけ直す必要がある。

  3. インポートを実行
    AdminerEvo上にて
    インポート > サーバーから実行(Webサーバファイル) > ファイルを実行 ボタン押下

これでエラーなくインポート完了できた。

AIに聞いたらwp-config.phpでメモリの上限を書き換えるとかいろいろ出てきたけど
試してもうまくいかず、最終的にこれで解決した。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?