കണ്ടന്റ് മാനേജ്മെന്റ് സിസ്റ്റങ്ങൾ
ഇഷ്ടാനുസൃത ഡിജിറ്റൽ അനുഭവങ്ങൾ സൃഷ്ടിക്കുന്നതിനുള്ള വഴക്കമുള്ള ഉള്ളടക്ക മാനേജ്മെന്റ് സിസ്റ്റം
ഏത് തരം കണ്ടന്റിനും സെക്ഷനുകൾ, എൻട്രികൾ, ഫീൽഡുകൾ, Matrix ബ്ലോക്കുകൾ എന്നിവ ഉപയോഗിച്ച് ഇഷ്ടാനുസൃത കണ്ടന്റ് ഘടനകൾ സൃഷ്ടിക്കുക
എഡിറ്റർമാർക്ക് സ്വതന്ത്രമായി ക്രമീകരിക്കാവുന്ന, പുനരുപയോഗിക്കാവുന്ന കണ്ടന്റ് ബ്ലോക്കുകളുപയോഗിച്ച് വഴക്കമുള്ളതും മോഡുലാറുമായ പേജ് ലേഔട്ടുകൾ നിർമ്മിക്കുക
ശക്തമായ സിന്റാക്സ്, വൃത്തിയുള്ള മാർക്കപ്പ്, മികച്ച ഡോക്യുമെന്റേഷൻ എന്നിവയുള്ള ഡിസൈനർ-സൗഹൃദ ടെംപ്ലേറ്റുകൾ
പങ്കിട്ടതോ പ്രാദേശികവൽക്കരിച്ചതോ ആയ കണ്ടന്റോടെ ഒറ്റ ഇൻസ്റ്റലേഷനിൽ നിന്ന് ഒന്നിലധികം സൈറ്റുകളും ഭാഷകളും ലോക്കേലുകളും മാനേജ് ചെയ്യുക
ലൈവ് പ്രിവ്യൂ, അസറ്റ് മാനേജർ, ഇമേജ് എഡിറ്റിംഗ് എന്നിവയുള്ള, കസ്റ്റമർമാർക്ക് ഇഷ്ടപ്പെടുന്ന മനോഹരവും വേഗതയേറിയതുമായ അഡ്മിൻ ഇന്റർഫേസ്
ഇ-കൊമേഴ്സിനായി Craft Commerce, SEO ടൂളുകൾ, ഫോമുകൾ, ഇഷ്ടാനുസൃത വികസനം എന്നിവ ഉൾപ്പെടെ വിപുലമായ പ്ലഗിനുകൾ
sudo apt update && sudo apt upgrade -y
sudo apt install php8.1 php8.1-{fpm,cli,mysql,gd,mbstring,xml,curl,zip,intl,imagick} -y2. Composer ഇൻസ്റ്റാൾ ചെയ്യുക:curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer3. MySQL ഇൻസ്റ്റാൾ ചെയ്യുക:sudo apt install mysql-server -y
sudo mysql
CREATE DATABASE craftcms CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'craftuser'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON craftcms.* TO 'craftuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;4. Craft പ്രോജക്ട് സൃഷ്ടിക്കുക:cd /var/www
composer create-project craftcms/craft mysite
cd mysite5. അനുമതികൾ സജ്ജമാക്കുക:sudo chown -R www-data:www-data /var/www/mysite
sudo chmod -R 755 /var/www/mysite
sudo chmod -R 777 /var/www/mysite/storage
sudo chmod -R 777 /var/www/mysite/config
sudo chmod -R 777 /var/www/mysite/web/cpresources6. എൻവയോൺമെന്റ് കോൺഫിഗർ ചെയ്യുക:cp .env.example .env
nano .envകോൺഫിഗറേഷൻ സജ്ജമാക്കുക:ENVIRONMENT="production"
SECURITY_KEY="generate-via-php-craft-setup-security-key"
DB_DRIVER="mysql"
DB_SERVER="127.0.0.1"
DB_PORT="3306"
DB_DATABASE="craftcms"
DB_USER="craftuser"
DB_PASSWORD="secure_password"
DB_SCHEMA="public"
DB_TABLE_PREFIX=""
PRIMARY_SITE_URL="https://yourdomain.com"7. Nginx കോൺഫിഗർ ചെയ്യുക:sudo nano /etc/nginx/sites-available/craftcmsചേർക്കുക:server {
listen 80;
server_name yourdomain.com;
root /var/www/mysite/web;
index index.php index.html;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
client_max_body_size 100M;
}സൈറ്റ് പ്രവർത്തനക്ഷമമാക്കുക:sudo ln -s /etc/nginx/sites-available/craftcms /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx8. SSL സർട്ടിഫിക്കറ്റ് നേടുക:sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d yourdomain.com9. Craft സെറ്റപ്പ് റൺ ചെയ്യുക:php craft setup/security-key
php craft installഇവ ചെയ്യാൻ പ്രോംപ്റ്റുകൾ പിന്തുടരുക:<?php
use craft\helpers\App;
return [
'*' => [
'defaultWeekStartDay' => 1,
'omitScriptNameInUrls' => true,
'securityKey' => App::env('SECURITY_KEY'),
'cpTrigger' => 'admin',
],
'production' => [
'devMode' => false,
'allowAdminChanges' => false,
'enableTemplateCaching' => true,
],
'dev' => [
'devMode' => true,
'allowAdminChanges' => true,
'enableTemplateCaching' => false,
],
];2. ഡാറ്റാബേസ് കോൺഫിഗ് (config/db.php):<?php
return [
'driver' => App::env('DB_DRIVER'),
'server' => App::env('DB_SERVER'),
'port' => App::env('DB_PORT'),
'database' => App::env('DB_DATABASE'),
'user' => App::env('DB_USER'),
'password' => App::env('DB_PASSWORD'),
'schema' => App::env('DB_SCHEMA'),
'tablePrefix' => App::env('DB_TABLE_PREFIX'),
];3. Twig ടെംപ്ലേറ്റ് ഉദാഹരണം:{# templates/index.twig #}
{% extends "_layout" %}
{% block content %}
<h1>{{ entry.title }}</h1>
{# Matrix field #}
{% for block in entry.contentBlocks.all() %}
{% switch block.type %}
{% case "text" %}
<div class="text-block">
{{ block.text|raw }}
</div>
{% case "image" %}
<figure>
<img src="{{ block.image.one().url }}" alt="{{ block.image.one().title }}">
<figcaption>{{ block.caption }}</figcaption>
</figure>
{% case "gallery" %}
<div class="gallery">
{% for image in block.images.all() %}
<img src="{{ image.url }}" alt="{{ image.title }}">
{% endfor %}
</div>
{% endswitch %}
{% endfor %}
{% endblock %}4. എൻട്രികൾ ക്വറി ചെയ്യൽ:{# Get all blog posts #}
{% set posts = craft.entries()
.section('blog')
.orderBy('postDate desc')
.limit(10)
.all() %}
{% for post in posts %}
<article>
<h2>{{ post.title }}</h2>
<p>{{ post.summary }}</p>
<a href="{{ post.url }}">Read more</a>
</article>
{% endfor %}
{# Get related entries #}
{% set relatedPosts = craft.entries()
.section('blog')
.relatedTo(entry)
.limit(3)
.all() %}5. അസറ്റ് ട്രാൻസ്ഫോർമുകൾ:{# Define image transform #}
{% set thumb = {
mode: 'crop',
width: 300,
height: 300,
quality: 80
} %}
<img src="{{ image.url(thumb) }}" alt="{{ image.title }}">
{# Or use named transforms (config/image-transforms.php) #}
<img src="{{ image.url('thumbnail') }}" alt="{{ image.title }}">6. മൾട്ടി-സൈറ്റ് കോൺഫിഗറേഷൻ:<?php
// config/general.php
return [
'*' => [
'siteUrl' => [
'en' => 'https://example.com',
'fr' => 'https://example.com/fr',
'de' => 'https://example.de',
],
],
];7. ഇഷ്ടാനുസൃത മൊഡ്യൂൾ ഉദാഹരണം:# Generate module
php craft make module
# config/app.php
return [
'modules' => [
'my-module' => \modules\Module::class,
],
'bootstrap' => ['my-module'],
];8. കാഷിംഗ്:<?php
// Enable Redis caching
// config/app.php
use craft\helpers\App;
return [
'components' => [
'cache' => [
'class' => yii\redis\Cache::class,
'redis' => [
'hostname' => 'localhost',
'port' => 6379,
'database' => 0,
],
],
],
];9. CLI കമാൻഡുകൾ:# Clear caches
php craft clear-caches/all
# Backup database
php craft backup/db
# Restore database
php craft restore/db path/to/backup.sql
# Run migrations
php craft migrate/all
# Generate security key
php craft setup/security-key
# Create admin user
php craft users/create
# Project config sync
php craft project-config/apply10. പ്രകടന ഒപ്റ്റിമൈസേഷൻ:<?php
// config/general.php
return [
'production' => [
'enableTemplateCaching' => true,
'cacheDuration' => 3600,
'maxCachedCloudImageSize' => 2000,
'optimizeImageFilesize' => true,
'transformGifs' => false,
],
];മികച്ച രീതികൾ:allowAdminChanges => false പ്രവർത്തനക്ഷമമാക്കുകphp craft backup/db ഉപയോഗിച്ച് പതിവായ ഡാറ്റാബേസ് ബാക്കപ്പുകൾലളിതമായ VPS സമ്മര്ദ്ദം പ്രക്രിയയുമായി നിമിഷങ്ങള്ക്കുള്ളില് തുടങ്ങുക
Deploy in about 2 minutes • Full root access • Support by ticket and email