Problems with no new posts in WordPress

  1. Operating environment
    • Server: Synology
    • Hostname: www.wildbit.kr
    • Install location: /wordpress
    • Connection method: Connect to WordPress installed in the subfolder by host name using .htaccess
    • Using the Cache Enabler plugin
  2. Problem
    • When connecting to WordPress with the host name after writing a new post, the newly written post is not displayed.
    • If you specify the WordPress installation location in the URL, a new post will be displayed.
  3. Cause
    • When connecting to WordPress, the Cache Enabler creates a cache file in the cache folder.
    • When accessing WordPress installed in a subfolder by host name, a cache file is created in the cache folder root only once and cannot be deleted (cleared).
    • Cache folder: /wordpress/wp-content/cache/cache-enabler/hostname
  4. Resolution
    • Specify the absolute path (in bold shown below) in the .htaccess file RewriteRule
    • This will display the full path including the host name and directory, not the host name in the browser address bar.
RewriteEngine on

RewriteCond %{HTTP_HOST} ^(www.)?wildbit.kr$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ https://www.wildbit.kr/wordpress/$1

RewriteCond %{HTTP_HOST} ^(www.)?wildbit.kr$
RewriteRule ^(/)?$ https://www.wildbit.kr/wordpress/index.php [L]

Leave a Reply

Your email address will not be published. Required fields are marked *