I moved 2 sites from a shared server to a VPS. One of the sites works fine with a custom theme, but the second doesn't load the Bartik CSS styles.

Both sites has been moved via the user root and almost all of their directory permissions are 755 (user owner: root, group: root). The temporary directory is /tmp.

Manually clearing the cache doesn't make any difference.


How can I resolve this issue?


This sometime happens if Apache server is not able to write files or directory.

Since you mentioned you moved using root user, Apache server may not be running on root user.

To further clarify this: If the inodes of both sites have the same permissions, ownership, grouping, but only one works, it's because it doesn't have CSS and JS aggregation on (a thing that requires an Apache user --- that is, www-data ownership and grouping, that you should apply).

You could either turn off CSS and JS aggregation for the non working site (and then it'll work), or make sure you give both sites such ownership and grouping if you want both of them to work properly with CSS JS aggeregation.

If at least for now you just want to turn off CSS JS aggregation, read here how to do so, but for troubleshooting this (and take care of the root cause), read the following (you might want to precede it with this piece of data on the aforementioned Apache user):

  1. First check on which user apache server is running. Finding out what user Apache is running as?

  2. Change your tmp folder and files folder ownership to that user so that it is writable by Apache.Giving ownership of the directory to the apache user?

  3. Make sure you have tmp directory created in your files folder and is writable by Apache server. You can define it your Configuration > File System


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy