انتقل إلى المحتوى

الدروس ووردبريس متوسط1 دقائق قراءة

How to Create a WordPress Staging Site

Test updates safely on a staging copy of your WordPress site: create a subdomain, clone files and database, hide it from search engines, and push changes.

بواسطة فريق تحرير ZSOLNET آخر تحديث

هذه الصفحة غير متاحة بالعربية بعد، لذا تُعرض بالإنجليزية.

أهم النقاط

  • A staging site is a private copy for testing changes.
  • Keep it password-protected and out of search engines.
  • Never copy a staging database over a live shop without merging new orders.

Option 1: Use your installer

In cPanel, open your WordPress installer, find your installation and choose Create Staging. Pick a subdomain such as staging.example.com, then wait for the copy to finish.

Option 2: Do it manually

  1. Create a subdomain like staging.example.com with its own document root.
  2. Copy the files from your live site’s folder into the subdomain folder.
  3. Export the live database and import it into a new, empty database.
  4. Update wp-config.php in the staging folder with the new database details.
  5. Replace the URL in the staging database from https://example.com to https://staging.example.com with a search-replace tool or WP-CLI:
wp search-replace 'https://example.com' 'https://staging.example.com' --skip-columns=guid

Keep it private

  • Password-protect the staging folder with Directory Privacy.
  • In staging, tick Settings → Reading → Discourage search engines.
yourdomain.com/wp-admin
  • Dashboard
  • Posts
  • Media
  • Pages
  • Appearance
  • Plugins
  • Users
  • Tools
  • Settings
    • General
    • Reading3
    • Permalinks

Reading

Save Changes
3 On the staging copy, turn on 'Discourage search engines from indexing this site'.

Push changes live

For design and plugin changes, repeat them on live or use your installer’s Push to Live. For shops and membership sites, avoid overwriting the live database — new orders and users would be lost.

الأسئلة الشائعة

Can my WordPress installer create staging for me?

Many installers, including Softaculous, have a Create Staging option that clones the site to a subdomain or folder automatically.

Should staging be indexed by Google?

No. Password-protect it and tick 'Discourage search engines' in Settings → Reading, so it never competes with your live site.

شارك X LinkedIn Facebook

الدخول إلى حسابك

أدِر نطاقاتك واستضافتك وفواتيرك من مكان واحد.

اتصال آمن مباشرة مع منطقة العملاء في ZSOLNET.

ليس لديك حساب؟