Hot answers tagged

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

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
  • 24k
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.5k
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

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
  • 24k
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

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,582
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,485
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

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

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

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

500 Internal Server Error when accessing admin

It turned out that RewriteBase / needed to be added to the htaccess
Andrew's user avatar
  • 738
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
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.4k
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

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
  • 24k
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.4k
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,582
3 votes

Visitor drop off since moving over to Craft CMS

I wouldn't be overly concerned about bounce rates and such, I'd be more concerned about conversion metrics. The reason is that many things affect bounce rate; if the new site is better designed, ...
andrew.welch's user avatar
  • 11.5k
3 votes
Accepted

Code shows instead of homepage

If your website is showing the text of your index.php instead of the actual website code, something is misconfigured with your server setup. Anything .php should be passed along to php-fpm or whatever ...
andrew.welch's user avatar
  • 11.5k
3 votes

How does the Craft CMS built-in web server works?

This just launches PHP's built in web server, documentation for it can be found here: https://www.php.net/manual/en/features.commandline.webserver.php You can use php -s localhost:8000 instead You ...
dmatthams's user avatar
  • 2,492
3 votes
Accepted

Less complicated local development w/Craft 3, is it possible?

If you're used to Local you can also use that for Craft. Here's 2 articles to get you started: https://medium.com/@madebyraygun/a-quick-and-easy-local-environment-for-craft-3-4fd7c7ff5815 and ...
erwinheiser's user avatar
2 votes

Can't get Craft running on Heroku

I solved it. I needed to remove calls to 'server' and 'http' in my enginx_app.conf file. Now the file only makes calls to 'location'.
cheechaw's user avatar
  • 101
2 votes

Get "Internal Server Error Undefined index: handle"

This ended up being an environmental issue with semi-largish Matrix fields. The three most common culprits are your php.ini file's max_input_vars, max_input_nesting_level and post_max_size would ...
Brad Bell's user avatar
  • 67.4k
2 votes

Internal Server Error

You're running Craft 2.6+ and you've got an older version of the Redactor I plugin installed that isn't Craft 2.6 compatible. If you download the latest version of the plugin and install it, the ...
Brad Bell's user avatar
  • 67.4k
2 votes

Craft files and DB out of sync

It looks like the database schema (at Craft version 2.6.2773) is ahead of the craft/app files on your file system (at Craft version 2.5.2763). Since (I assume) you're not seeing any update info being ...
Brad Bell's user avatar
  • 67.4k

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