• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Plesk-generated URL Caching?

marvin

Basic Pleskian
I recently discovered that Plesk can generate temporary URLs for staging/setting up new sites. After using this feature on a Wordpress site (no issues) I attempted to use it on a Silverstripe site. For reasons that are, as yet, unclear, the Silverstripe site refused to load any related CSS siles and so the total effect was, putting it simply, ****.
Not to worry! I'll set up a temporary URL my own way and assign it to the site. The result -- the same cr*p.

OK, I'm going to take the 'NUCLEAR' option here and completely delete the directory and start again. No wait, I'll go one better and give it a different name. For host, FTP login, Database credentials -- everything!!
Result. Same old cr*p.

UNTIL I NOTICED: The output from the latest attempt had similarities to my previous attempts. IN PARTICULAR the continued use of the string GET /plesk-site-preview/focused-mccarthy... which is causing a 404 error (focused-mccarthy was the original Plesk-generate URL which I thought I'd successfully disposed of). This is preventing the site from loading normally and causing 404 error -- it can't find any css, js files that it needs.

I believe this is some sort of caching thing. Despite the fact that I should be seeing a clean database, no content from the original site (where the problem occurred). But how do I clear it??
 
There could be more than one single thing in play. For one, it is a Wordpress site. When you migrate such a site to a different domain, you must make sure that the siteurl and home datasets in your *_options table reflect the new URL. You must also make sure that the https/http and www/non-www spelling of the domain and redirect settings in the web server are perfectly consistent and that no URL rewrite that refers to the old domain exists in an .htaccess file. Much of this can be done automatically by using a plugin for migration such as Snap Creek Duplicator.

Also, it is thinkable that the installation is set to Nginx-only hosting (disabled "Proxy mode" in Apache & Nginx settings). In that case you'll also need to select a PHP handler "PHP-FPM via Nginx" (instead of Apache) and you need to add at least the additional directives explained in this article to the Nginx configuration:

Then also be careful with Nginx caching. Nginx caches static files, so it might be required to empty its cache. This can easily be done with the "Empty cache" button on the Apache & Nginx settings page.
 
There could be more than one single thing in play. For one, it is a Wordpress site. When you migrate such a site to a different domain, you must make sure that the siteurl and home datasets in your *_options table reflect the new URL. You must also make sure that the https/http and www/non-www spelling of the domain and redirect settings in the web server are perfectly consistent and that no URL rewrite that refers to the old domain exists in an .htaccess file. Much of this can be done automatically by using a plugin for migration such as Snap Creek Duplicator.

Also, it is thinkable that the installation is set to Nginx-only hosting (disabled "Proxy mode" in Apache & Nginx settings). In that case you'll also need to select a PHP handler "PHP-FPM via Nginx" (instead of Apache) and you need to add at least the additional directives explained in this article to the Nginx configuration:

Then also be careful with Nginx caching. Nginx caches static files, so it might be required to empty its cache. This can easily be done with the "Empty cache" button on the Apache & Nginx settings page.

Hi @Peter Debik , Thanks for the feedback. Just a couple of things to clarify:

  1. The site with the problem is a Silverstripe CMS site. The Wordpress site is fine on its temporary URL. The new name I have manually set (to investigate whether my problem with no CSS styles on the Silverstripe site is in a totally separate environment. Additionally as I 'nuked' (dumped) the complete installation there should not be any old .htaccess files hanging around.
  2. This makes me wonder if I have a Nginx cache issue. However looking at the seeings on Plesk, Nginx caching is not enabled. But I keep seeing reference to the Plesk-generated URL (/plesk-site-preview/focused-mccarthy). I can't see any logical reason for this to persist.
  3. Finally, logs tell me the path to the required .css and .jp files appears to be incomplete. for instance Error: Unable to find the file /var/www/vhosts/victoria.test.co.nz/reset.css at the specified location -- I believe this file should be at /var/www/vhosts/victoria.test.co.nz/public/_resources/themes/victoria/css/reset.css
 
  1. Finally, logs tell me the path to the required .css and .jp files appears to be incomplete. for instance Error: Unable to find the file /var/www/vhosts/victoria.test.co.nz/reset.css at the specified location -- I believe this file should be at /var/www/vhosts/victoria.test.co.nz/public/_resources/themes/victoria/css/reset.css
There you have it. Now you only need to find out where in the configuration the domain part is missing. In most systems the path to the installation needs to be set in a config file.
 
Back
Top