WordPress 託管 說明

Change the table prefixes

Note: This is the fifth step in manually migrating a WordPress site to your Pro Managed WordPress account. If you don't have a Pro Managed WordPress account, you can learn more about them here.

Part 1: Copy the wp-content folder Part 2: Make an SQL dump file
Part 3: Upload the site content Part 4: Update the site database
Part 5: Change the table prefixes Part 6: Make final edits

This next step in manually moving a WordPress site to a Pro Managed WordPress account: Change table prefixes in the WordPress site database. You need to use phpMyAdmin to change the prefixes. Give yourself 10-15 minutes for this part.

Note: At the end of Part 4, you checked the table prefix in the site database. If that table prefix is not "wp", continue with the rest of this article. If that table prefix is "wp", skip this part and continue with Part 6.

  1. If you still have the phpMyAdmin page open for the site, continue with the next step. Otherwise, open phpMyAdmin for the Pro Managed WordPress site.
  2. In the list of tables, click the table name ending in usermeta.
    select usermeta
  3. Click SQL.
    click sql
  4. Click Clear.
  5. Copy and paste this code in the editing window:

    UPDATE 'tablePrefix_usermeta' SET 'meta_key'= REPLACE ('meta_key', 'wp_', 'tablePrefix_') WHERE 'meta_key' LIKE 'wp_%'
    copy and paste code in editing window

  6. Replace tablePrefix with the table prefix you copied earlier. Be careful not to delete the underscore character after the table prefix. In our example, this code looks like:

    UPDATE 'abc123_usermeta' SET 'meta_key'= REPLACE ('meta_key', 'wp_', 'abc123_') WHERE 'meta_key' LIKE 'wp_%'

  7. Click Go. The usermeta table is updated.
  8. In the list of tables, click the table name ending in options.
  9. Click SQL, and then click Clear.
  10. Copy and paste this code in the editing window:

    UPDATE 'tablePrefix_options' SET 'option_name' = REPLACE ('option_name', 'wp_', 'tablePrefix_') WHERE 'option_name' LIKE 'wp_%'

  11. Replace tablePrefix with the table prefix you copied earlier. Be careful not to delete the underscore character after the table prefix.
  12. Click Go. The options table is updated.
  13. Close the phpMyAdmin page, but hang on to the table prefix - you'll need that in the next part. The last part!
  14. Next step

    More info


這篇文章有用嗎?
感謝您提供意見。 若要與客戶服務代表聯絡,請撥打支援中心電話號碼,或使用上方的對話選項。
很高興能幫上忙! 還有什麼可幫您的嗎?
很抱歉有這種情形。 請告訴我們您不了解的部分,或解決方案無法解決您問題的原因。