{"id":331,"date":"2025-02-06T20:15:15","date_gmt":"2025-02-06T12:15:15","guid":{"rendered":"http:\/\/virtualcardx.com\/?p=331"},"modified":"2025-12-30T14:34:51","modified_gmt":"2025-12-30T06:34:51","slug":"%e5%9c%a8debian-12%e4%b8%8a%e6%89%8b%e5%8a%a8%e5%ae%89%e8%a3%85wordpress","status":"publish","type":"post","link":"https:\/\/virtualcardx.com\/en\/2025\/02\/06\/\u5728debian-12\u4e0a\u624b\u52a8\u5b89\u88c5wordpress\/","title":{"rendered":"Installing Wordpress manually on Debian 12"},"content":{"rendered":"<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"720\" height=\"405\" data-src=\"http:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/02\/debian.webp\" alt=\"\" class=\"wp-image-339 lazyload\" title=\"\" data-srcset=\"https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/02\/debian.webp 720w, https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/02\/debian-300x169.webp 300w, https:\/\/virtualcardx.com\/wp-content\/uploads\/2025\/02\/debian-600x338.webp 600w\" data-sizes=\"(max-width: 720px) 100vw, 720px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 720px; --smush-placeholder-aspect-ratio: 720\/405;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: ssh login to Debian OS<\/h2>\n\n\n\n<p>ssh root@servername<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Install nginx, mariadb, php<\/h2>\n\n\n\n<p>1. Update the source first<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get update\n\napt-get upgrade<\/code><\/pre>\n\n\n\n<p>2. Install nginx<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install nginx\n\nsystemctl start nginx\n\nsystemctl enable nginx\n\napt install mariadb-server<\/code><\/pre>\n\n\n\n<p>3. Install php and its add-ons<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install php php-mysql php-gd php-xml php-mbstring php-curl php-fpm php-mysql php-imagick php-zip php-intl<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Configure the mariadb database<\/h2>\n\n\n\n<p>1. Log in to the database with an empty initial root password for mariadb.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<p>2. Creation of a default database<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE [wordpressdatabasename].<\/code><\/pre>\n\n\n\n<p>3. create wordpress database account<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE USER '[wordpressuser]'@localhost IDENTIFIED BY 'wordpresspassword';<\/code><\/pre>\n\n\n\n<p>4. Granting access to the database<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GRANT ALL PRIVILEGES ON [wordpressdatabasename]. * TO [wordpressuser]@localhost IDENTIFIED BY 'wordpresspassword';<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>FLUSH PRIVILEGES.<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>EXIT.<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Configure the nginx service<\/h2>\n\n\n\n<p>1. In nginx create and modify the wordpress configuration file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/nginx\/sites-available\/wordpress<\/code><\/pre>\n\n\n\n<p>The configuration file is as follows:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n        listen 80; server_name\n        server_name <strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#e33d1b\" class=\"has-inline-color\">www.yourdomain.com<\/mark><\/strong> <strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#db2525\" class=\"has-inline-color\">yourdomain.com<\/mark>;<\/strong>\n        root \/var\/www\/wordpress.\n        index index.php index.html index.htm;\n        location \/ {\n        try_files $uri $uri\/ \/index.php?$args; }\n}\n\nlocation ~ .php$ {\n        include snippets\/fastcgi-php.conf; } location ~ .\n        fastcgi_pass unix:\/var\/run\/php\/php8.2-fpm.sock; } location ~ .php$ { include snippets\/fastcgi-php.conf.\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\n        include fastcgi_params;\n}\n\nlocation ~ \/.ht {\n        deny all; }\n}<\/code><\/pre>\n\n\n\n<p>2. Edit the nginx global configuration file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/nginx\/nginx.conf<\/code><\/pre>\n\n\n\n<p>Modify the http{} node<\/p>\n\n\n\n<p>increase<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>client_max_body_size 20m;<\/code><\/pre>\n\n\n\n<p>3. Link the wordpress configuration file to the site configuration folder<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ln -s \/etc\/nginx\/sites-available\/wordpress \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n\n\n\n<p>4. Testing for correct configuration<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx -t\nsystemctl restart nginx<\/code><\/pre>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\"><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Configure PHP<\/h2>\n\n\n\n<p>Edit php configuration file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/php\/8.2\/fpm\/php.ini<\/code><\/pre>\n\n\n\n<p>Modify the following parameters:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>max_execution_time = 1200<br>max_input_time = 1200<br>upload_max_filesize = 200M<br>post_max_size = 800m<\/code><\/pre>\n\n\n\n<p>Restart php service<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service php8.2-fpm restart<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Download and install wordpress<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/tmp\ncurl -O https:\/\/wordpress.org\/latest.tar.gz\n\ntar xzvf latest.tar.gz\ncp -a \/tmp\/wordpress\/. \/var\/www\/wordpress\n\nchown -R www-data:www-data \/var\/www\/wordpress<\/code><\/pre>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>Step 1: ssh login to Debian OS ... <\/p>\n<p class=\"read-more-container\"><a title=\"Installing Wordpress manually on Debian 12\" class=\"read-more button\" href=\"https:\/\/virtualcardx.com\/en\/2025\/02\/06\/\u5728debian-12\u4e0a\u624b\u52a8\u5b89\u88c5wordpress\/#more-331\" aria-label=\"Read more about Installing Wordpress manually on Debian 12\">Read more<\/a><\/p>","protected":false},"author":1,"featured_media":339,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"class_list":["post-331","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/comments?post=331"}],"version-history":[{"count":0,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/posts\/331\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/media\/339"}],"wp:attachment":[{"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/media?parent=331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/categories?post=331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualcardx.com\/en\/wp-json\/wp\/v2\/tags?post=331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}