Hot answers tagged

13 votes

All images uploading... except JPG files

I had this same issue and resolved it (at the suggestion of Craft CMS support) by enabling ImageMagick in the php.ini and restarting MAMP PRO. Per the MAMP PRO 3.0 user guide: The ImageMagick PHP ...
PhilR's user avatar
  • 418
8 votes

What are useful guidelines for Craft CMS security on VPS (virtual private servers)?

This morning a couple of postings on Craft Slack #devops area linked good descriptions of basic server security, led by @merlingore there. Their instructions are tilted towards Ubuntu as far as ...
narration_sd's user avatar
  • 1,697
7 votes

Server respond is very long (25s). Is there a way to optimize the perfomance?

Let me try to turn this into a more valuable StackExchange for others who will find it, since the original poster apparently got help and solved his problem without participating here. We can see so ...
narration_sd's user avatar
  • 1,697
7 votes

How do I redirect traffic from a legacy category URL to a new category URL?

There are a few plugins which can handle this, but Retour is the newest and shiniest! https://github.com/nystudio107/retour It's from the same developer as SEOmatic... he puts a lot of love & ...
Lindsey D's user avatar
  • 23.9k
6 votes
Accepted

What is the recommended Nginx configuration for Craft?

This Nginx-Craft configuration is one I've been using in production for some time, and it implements many best-practices that you might want to be using: https://github.com/nystudio107/nginx-craft
andrew.welch's user avatar
  • 11.3k
6 votes
Accepted

How do I redirect traffic from a legacy category URL to a new category URL?

Craft has a twig redirect tag. You should be able to create a "redirect" template that handles redirects based on {slug} and/or url segments and then use Craft routes to direct "legacy-subdirectory"...
Moto_Nomad's user avatar
5 votes
Accepted

Running Craft alongside another CMS on the same domain

You're asking a loaded question. I don't think there's a wrong answer here but if it were me, you have a couple options. Addressing the Elephant in the Room How good of a salesman are you? ;) You ...
RitterKnight's user avatar
  • 6,572
5 votes
Accepted

Installing other PHP app in sub directory

Yes, possible. You just need to override the URL routing within the subdirectory, so requests to /sub/* get routed to /sub/index.php rather than /index.php. For example, if you’re using Apache, just ...
Brandon Kelly's user avatar
5 votes
Accepted

Craft hangs when updating entry

It turns out that I was running a dev release of PHP 5.6 from a PPA and not the official Ubuntu release. With Brad Bell's help (thank you so much!) I got on the right track to looking into PHP and ...
anguiac7's user avatar
  • 346
5 votes

Self-hosting requirements/scaling

No reason at all, that should work perfectly fine. In fact, at least 90% of my projects keep files, database, and assets all on the same server. For the remaining 10%, I'm usually only moving the ...
Lindsey D's user avatar
  • 23.9k
5 votes
Accepted

Problems setting up a local site

You can't use the domain .dev anymore, it's Google's gTLD (https://icannwiki.org/.dev) and they don't want to share. See https://medium.engineering/use-a-dev-domain-not-anymore-95219778e6fd for a ...
Seth Warburton's user avatar
5 votes
Accepted

Craft 3: 500 Internal Server Error when trying to install on server

The 503 error on the home page usually indicates that Craft can't connect to the database. That's to be expected when performing a fresh installation. The internal server error could be a typo or ...
Sam Hernandez's user avatar
5 votes
Accepted

Undefined index: siteSettings when updating entry types

Even with 'useProjectConfigFile' => false, it is still active under the hood. Could you run ./craft project-config/rebuild and see if that fixes the issue?
Oli's user avatar
  • 7,370
4 votes
Accepted

Unable to create the cache directory

Yes, Craft still has its runtime caches for compiling Twig templates (as seen in your example) and such. Craft's template and partial cache is separate from Twig's own template compilation, if I'm not ...
Matt Stein's user avatar
  • 3,996
4 votes

Server respond is very long (25s). Is there a way to optimize the perfomance?

You have a lot of matrix blocks; I'm guessing that's why your output is slow. It looks like your initial query doesn't depend on any other input, so you could probably cache the whole thing. I would ...
RitterKnight's user avatar
  • 6,572
4 votes

Getting $craftPath error on server trying to get Craft running

If your permissions are set correctly, your php.ini is all correct, your craft folder exists and everything seems like it should work fine... Make sure you have the app folder inside the craft folder ...
Ian's user avatar
  • 564
4 votes
Accepted

Can you run Craft CP on one webserver and serve the front end content on a separate one?

It looks like this question was resolved via some extended sleuthing in the comments above: Can I disable the control panel? How can I run the Control Panel from a separate domain? Overall, it looks ...
Ben Parizek's user avatar
  • 13.3k
4 votes

All images uploading... except JPG files

I kept bumping into the same kind of issue. Even when I applied a fix mentioned here or in another topic. After a while the same issue would arise again. What finally did the trick for me - in MAMP, ...
Sjoerd's user avatar
  • 51
4 votes
Accepted

How to serve Craft with Caddy server

For local development the Caddyfile looks like this (assuming that php-fpm runs on port 9000, you may have to adapt root to point to your web root relative to the location of the Caddyfile): ...
Lars Bilke's user avatar
4 votes

Running Craft alongside another CMS on the same domain

I've never had a problem running more than one application, but have always done so from within a sub-directory. e.g. domain.com/marketing/ However the most obvious impact with the above is that you'...
Matt P's user avatar
  • 1,538
4 votes
Accepted

Does Craft work with PHP 7?

As @mmikkel pointed out, as of Craft 2.4.2697, Craft is PHP 7 compatible.
Brad Bell's user avatar
  • 67.2k
4 votes
Accepted

What does the Timezone in Settings -> General represent?

You set it to whatever timezone the content authors will be in, so for example, when they say an entry’s post date is at 10 AM, Craft knows which timezone that should refer to.
Brandon Kelly's user avatar
4 votes

500 Internal Server Error when accessing admin

It turned out that RewriteBase / needed to be added to the htaccess
Andrew's user avatar
  • 740
3 votes
Accepted

White screen during installation

Whenever I've had a completely white screen from Craft I've traced it to a syntax error in one of the files in craft/config, so I'd double-check your db.php and general.php if they've been edited.
Mike Pepper's user avatar
  • 4,391
3 votes
Accepted

Is it possible to force Craft to recheck available sever modules?

Craft will re-run the requirement checks simply by loading that admin/utils/serverinfo page. The results aren't cached. It sounds like your box may have had the ImageMagic library installed, but not ...
Brad Bell's user avatar
  • 67.2k
3 votes

Craft site moved to HTTPS - now having issues

So, removing the cache settings for CSS and JS in my nginx config fixed this. # CSS and Javascript location ~* \.(?:css|js)$ { expires 1M; access_log off; } Also, once I got into the admin area ...
Adam Menczykowski's user avatar
3 votes

Plugin to report when site becomes unavailable

There's no plugin for that... it wouldn't quite make sense. If the site went down, the plugin would be down too. Your best bet is to find a 3rd party service to monitor the site's uptime. There are ...
Lindsey D's user avatar
  • 23.9k
3 votes

Manual update fails on server

I figured it out. It was super unexpected, after turning on errors finally, I got Fatal error: Class 'Craft\AppPathCacheDependency' not found in Then I realized that GIT didn't include that file, ...
Tibor Szasz's user avatar
3 votes
Accepted

Do servers in a multi-server Craft setup need to share a storage directory?

Personally, I'd lean towards keeping the shared NFS volume. It's not just the runtime folder, but things like backups, site logos, user avatars, etc. and anything else plugins might be storing in ...
Brad Bell's user avatar
  • 67.2k
3 votes

Self-hosting requirements/scaling

Not to stray too far off the Craft beaten path here but any scaling guidelines you see on other sites usually will apply to Craft as well. You'll know when you need to start scaling... might you have ...
RitterKnight's user avatar
  • 6,572

Only top scored, non community-wiki answers of a minimum length are eligible