【重要資安警示】發現冒充 Qfinder Pro 的非官方網站,了解詳情 >

How to setup Wordpress to use HTTPS connection ?


最後修訂日期: 2022-06-24
Applicable Products:
  • Wordpress
  • QTS 5.0 or later

After installing WordPress in App center, HTTP connection is used by default. If you want to access WordPress via HTTPS connection, you need to manually modify the configuration file of WordPress.

  1. Refer to the link below to locate the configuration files of WordPress

    How do I locate the configuration files of WordPress after upgrading WordPress to 5.8.x in QTS 5.0?

    Normally the configuration files are located in /share/CACHEDEV1_DATA/.qpkg/WordPress/data/web/WordPress

  2. Follow the steps below to manually map WordPress folder in Shared Folder setting then edit/upload those files using File Station:

    1. Log in to QTS as administrator.

    2. Go to Control Panel > Privilege > Shared Folders

    3. Select Create > Shared Folder.

      1. Choose Disk Volume (for example: DataVol1 )
      2. Select Enter path manually
      3. Click the dropdown menu and locate WordPress folder (for example: /.qpkg/WordPress/data/web/WordPress )
      4. Enter the Folder Name.(for example: WordPress-web)
      5. Select “Create” .
        img
  3. Edit the configuration files by Text Editor

    1. Log in to QTS as administrator.

    2. Open App Center, install Text Editor.

    3. Open File Station

      1. Right-click wp-config.php in wordpress-web shared folder.
      2. Click Edit in Text Editor

      img

      Text Editor window opens.

      1. Locate the end of this file :/* That's all, stop editing! Happy publishing. */, before this line, add the following three lines of settings.
        Including the content of WP_HOME and WP_SITEURL.
        About the IP:Port Number, please adjust according to the NAS environment, the setting of QTS Web Server https port number.

         
        define('WP_HOME','https://172.17.34.50:8081/WordPress');
        define('WP_SITEURL','https://172.17.34.50:8081/WordPress');
        $_SERVER['HTTPS'] = 'on';

        img
        img

      2. Save the file

  4. Now, the Browser is able to WordPress by HTTPS connection.

Note: After applying this method, The HTTP connection to WordPress site will also be force redirect to HTTPS connection.

這篇文章有幫助嗎?

87% 的人認為有幫助。
謝謝您,我們已經收到您的意見。

請告訴我們如何改進這篇文章:

如果您想提供其他意見,請於下方輸入。

選擇規格

      顯示更多 隱藏更多
      選擇其他偏好的語言:
      back to top