{"id":26269,"date":"2026-04-21T00:06:44","date_gmt":"2026-04-20T17:06:44","guid":{"rendered":"https:\/\/ontohood.my.id\/?p=26269"},"modified":"2026-04-21T00:06:44","modified_gmt":"2026-04-20T17:06:44","slug":"install-wordpress-on-debian-12-step-by-step-guide","status":"publish","type":"post","link":"https:\/\/ontohood.my.id\/?p=26269","title":{"rendered":"Install WordPress on Debian 12 | Step-by-Step Guide"},"content":{"rendered":"\n<p>WordPress is a massive content management system used by millions of websites worldwide. If you\u2019re on Debian 12 and want to install WordPress, this guide will walk you through it in a step-by-step, beginner-friendly way.<\/p>\n\n\n\n<p>Whether you\u2019re a developer or a small business owner, this will help you install WordPress on Debian 12 in no time.<\/p>\n\n\n\n<p>How to Install WordPress on Debian 12:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"0-requirements\">Requirements<\/h2>\n\n\n\n<p>Before you begin, ensure you have the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>A Debian 12 Server:\u00a0<\/strong>Ensure your server is running the latest version of Debian 12 with SSH access.<\/li>\n\n\n\n<li><strong>Domain Name and DNS Settings:\u00a0<\/strong>Have a domain pointed to your server\u2019s IP address.<\/li>\n\n\n\n<li><strong>LAMP Stack Installed:\u00a0<\/strong>Install\u00a0<strong>Linux<\/strong>,\u00a0<strong>Apache<\/strong>,\u00a0<strong>MySQL\/MariaDB<\/strong>, and\u00a0<strong>PHP<\/strong>\u00a0(referred to as the LAMP stack).<\/li>\n\n\n\n<li><strong>Root or Sudo User Access:\u00a0<\/strong>Access to a user with sudo privileges for executing administrative tasks.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1-step-1-update-and-upgrade-your-server\">Step 1: Update and Upgrade Your Server<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always start by ensuring your system is up-to-date. Run the following commands:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<p>This will update the package list and upgrade the installed packages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2-step-2-install-apache-web-server\">Step 2: Install Apache Web Server<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apache is one of the most popular web servers for\u00a0<a href=\"https:\/\/www.gsplugins.com\/how-to-install-wordpress-on-bluehost\/\">hosting WordPress<\/a>. To install it, type:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install apache2 -y<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable and start the Apache service:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable apache2\nsystemctl start apache2<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check if Apache is running by visiting your server\u2019s IP address in a web browser. You should see the default Apache welcome page.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3-step-3-install-php\">Step 3: Install PHP<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WordPress requires\u00a0<a href=\"https:\/\/www.php.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">PHP<\/a>\u00a0to function. Install PHP and necessary extensions:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install php php-mysql libapache2-mod-php php-cli php-curl php-xml php-mbstring -y<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Verify the PHP installation:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<p>This will display the PHP version.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4-step-4-install-mysql-and-create-a-database\">Step 4: Install MySQL and Create a Database<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>WordPress needs a database to store its content. Install MySQL server:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install mysql-server -y<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Secure the MySQL installation by running:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql_secure_installation<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<p>During the process, set a root password and follow the prompts to improve security.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to MySQL:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a database and user for WordPress:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE wordpress;\n\nCREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'yourpassword';\n\nGRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';\n\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p>SQL<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5-step-5-download-wordpress\">Step 5: Download WordPress<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Navigate to your web server\u2019s root directory:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/var\/www\/html<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download the latest WordPress package:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/wordpress.org\/latest.zip (Online)\n\nor download local network LAB SMKN 1 MAJALAYA (Offline)\n\nwget http:\/\/192.168.106.252\/comot\/wrd.zip<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Extract the archive:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x wrd.zip\n\nunzip wrd.zip\n<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Move the WordPress files to the root directory:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>mv wordpress\/* \/var\/www\/html\/<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Set proper permissions:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\" style=\"border-width:1px\"><code>chown -R www-data:www-data \/var\/www\/html\n\nchmod -R 755 \/var\/www\/html<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"6-step-6-configure-apache\">Step 6: Configure Apache<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a virtual\u00a0<a href=\"https:\/\/www.gsplugins.com\/wordpress-site-backup-plugins\/\">host file for WordPress<\/a>:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/apache2\/sites-available\/wordpress.conf<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Add the following configuration:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80&gt;\n    ServerName yourdomain.com\n\n    DocumentRoot \/var\/www\/html\n\n    &lt;Directory \/var\/www\/html&gt;\n        AllowOverride All\n    &lt;\/Directory&gt;\n\n    ErrorLog ${APACHE_LOG_DIR}\/error.log\n\n    CustomLog ${APACHE_LOG_DIR}\/access.log combined\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n\n\n\n<p>Apache Configuration<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable the virtual host and Apache rewrite module:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>a2ensite wordpress.conf\n\na2enmod rewrite<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Restart Apache:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart apache2<\/code><\/pre>\n\n\n\n<p>Bash<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"7-step-7-configure-wordpress\">Step 7: Configure WordPress<\/h2>\n\n\n\n<p>Visit your domain or ip address in a web browser. You\u2019ll be greeted by the WordPress setup wizard.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select your language.<\/li>\n\n\n\n<li>Enter your database details:<\/li>\n\n\n\n<li>Database Name:\u00a0<strong>wordpress<\/strong><\/li>\n\n\n\n<li>Username:\u00a0<strong>wpuser<\/strong><\/li>\n\n\n\n<li>Password:\u00a0<strong>yourpassword<\/strong><\/li>\n\n\n\n<li>Click\u00a0<strong>Submit<\/strong>\u00a0and then\u00a0<strong>Run the Installation<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p>Provide site details like your website title, admin username, and password. Once complete, log in to your WordPress admin panel.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is a massive content management system used by millions of websites worldwide. If you\u2019re on Debian 12 and want to install WordPress, this guide will walk you through it in a step-by-step, beginner-friendly way. Whether you\u2019re a developer or a small business owner, this will help you install WordPress on Debian 12 in no [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":26270,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,5,8],"tags":[],"class_list":["post-26269","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrasi-server","category-news","category-teknologi"],"_links":{"self":[{"href":"https:\/\/ontohood.my.id\/index.php?rest_route=\/wp\/v2\/posts\/26269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ontohood.my.id\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ontohood.my.id\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ontohood.my.id\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ontohood.my.id\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26269"}],"version-history":[{"count":1,"href":"https:\/\/ontohood.my.id\/index.php?rest_route=\/wp\/v2\/posts\/26269\/revisions"}],"predecessor-version":[{"id":26271,"href":"https:\/\/ontohood.my.id\/index.php?rest_route=\/wp\/v2\/posts\/26269\/revisions\/26271"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ontohood.my.id\/index.php?rest_route=\/wp\/v2\/media\/26270"}],"wp:attachment":[{"href":"https:\/\/ontohood.my.id\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ontohood.my.id\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ontohood.my.id\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}