{"id":5032,"date":"2024-03-06T16:36:45","date_gmt":"2024-03-06T16:36:45","guid":{"rendered":"https:\/\/www.sebae.net\/blog\/?p=5032"},"modified":"2024-03-06T22:22:04","modified_gmt":"2024-03-06T22:22:04","slug":"how-to-install-wordpress-on-debian","status":"publish","type":"post","link":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/","title":{"rendered":"How To Install WordPress On Debian"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Today we are going to show you how to Install WordPress on Debian.  WordPress has emerged as one of the most popular content management systems (CMS) globally, powering millions of websites and blogs. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Its user-friendly interface, extensive plugin ecosystem, and robust community support make it an excellent choice for beginners and experienced developers alike. In this guide, we will walk you through the process of installing WordPress on a Debian-based server, providing a detailed, step-by-step tutorial.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">The future belongs to those who believe in the beauty of their dreams.<br><\/p>\n<cite>Eleanor Roosevelt<\/cite><\/blockquote>\n\n\n\n<div class=\"cnvs-block-toc cnvs-block-toc-1634680436164\" >\n\t<\/div>\n\n\n\n<h2 id=\"requirements\" class=\"wp-block-heading\">Requirements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before we begin, ensure that you have the following prerequisites:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A Debian-based server (such as Debian 11, Debian 12, or Ubuntu).<\/li>\n\n\n\n<li>A web server (Apache or Nginx).<\/li>\n\n\n\n<li>PHP installed on your server.<\/li>\n\n\n\n<li>MySQL or MariaDB database server.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">We always advise keeping to the latest Debian release, this will also ensure your servers are secure as possible.  Running an WordPress website allows you to also run an online store so its very important to keep the data safe. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can follow our tutorial on how to keep <a href=\"http:\/\/www.sebae.net\/blog\/how-to-configure-automatic-updates-on-debian\/\">Debian automatically updated<\/a>.<\/p>\n\n\n\n<h2 id=\"step-1-update-system-packages\" class=\"wp-block-heading\">Step 1: Update System Packages <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s crucial to start with an up-to-date system. Open a terminal window and run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo apt update sudo apt upgrade<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will update the package lists and upgrade any outdated packages on your system.<\/p>\n\n\n\n<h2 id=\"step-2-install-lamp-stack-apache-mysql-php\" class=\"wp-block-heading\">Step 2: Install LAMP Stack (Apache, MySQL, PHP) <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress requires a LAMP (Linux, Apache, MySQL, PHP) or LEMP (Linux, Nginx, MySQL, PHP) stack to function correctly. We&#8217;ll go with Apache, MySQL, and PHP for this guide.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install Apache:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo apt install apache2<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install MySQL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo apt install mysql-server<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">During the installation, MySQL will prompt you to set a root password. Make sure to choose a strong password and keep it secure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install PHP:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo apt install php libapache2-mod-php php-mysql<\/code><\/code><\/pre>\n\n\n\n<h2 id=\"step-3-create-a-mysql-database-and-user\" class=\"wp-block-heading\">Step 3: Create a MySQL Database and User <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let&#8217;s create a MySQL database and user for WordPress:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Login to MySQL as the root user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo mysql -u root -p<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new database:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>CREATE DATABASE wordpress;<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new user and grant privileges to the database:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wp_user'@'localhost'; FLUSH PRIVILEGES; EXIT;<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure to replace <code>'your_password'<\/code> with a strong password.<\/p>\n\n\n\n<h2 id=\"step-4-download-and-extract-wordpress\" class=\"wp-block-heading\">Step 4: Download and Extract WordPress <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to the Apache web root directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>cd \/var\/www\/html<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Download the latest WordPress package:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo wget https:\/\/wordpress.org\/latest.tar.gz<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Extract the downloaded file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo tar -xzvf latest.tar.gz<\/code><\/code><\/pre>\n\n\n\n<h2 id=\"step-5-configure-wordpress\" class=\"wp-block-heading\">Step 5: Configure WordPress <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let&#8217;s configure WordPress to connect to the MySQL database we created earlier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rename the WordPress directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo mv wordpress your_domain_name<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change ownership of the WordPress files:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo chown -R www-data:www-data your_domain_name<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Copy the sample configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo cp your_domain_name\/wp-config-sample.php your_domain_name\/wp-config.php<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Edit the <code>wp-config.php<\/code> file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo nano your_domain_name\/wp-config.php<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Update the database connection settings with the MySQL credentials you created earlier:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>define('DB_NAME', 'wordpress'); define('DB_USER', 'wp_user'); define('DB_PASSWORD', 'your_password');<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Save and close the file (<code>Ctrl + X<\/code>, <code>Y<\/code>, <code>Enter<\/code>).<\/p>\n\n\n\n<h2 id=\"step-6-configure-apache-virtual-host\" class=\"wp-block-heading\">Step 6: Configure Apache Virtual Host <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create a new virtual host configuration file for your domain:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo nano \/etc\/apache2\/sites-available\/your_domain_name.conf<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following configuration (replace <code>your_domain_name<\/code> with your actual domain name):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:80&gt;\n    ServerAdmin admin@your_domain_name\n    DocumentRoot \/var\/www\/html\/your_domain_name\n    ServerName your_domain_name\n    ServerAlias www.your_domain_name\n\n    &lt;Directory \/var\/www\/html\/your_domain_name&gt;\n        Options FollowSymLinks\n        AllowOverride All\n        Require all granted\n    &lt;\/Directory&gt;\n\n    ErrorLog ${APACHE_LOG_DIR}\/error.log\n    CustomLog ${APACHE_LOG_DIR}\/access.log combined\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Enable the virtual host and Apache modules:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo a2ensite your_domain_name.conf sudo a2enmod rewrite sudo systemctl restart apache2<\/code><\/code><\/pre>\n\n\n\n<h2 id=\"step-7-complete-the-installation\" class=\"wp-block-heading\">Step 7: Complete the Installation <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Open a web browser and navigate to your domain name (e.g., <code>http:\/\/your_domain_name<\/code>). You will be greeted with the WordPress installation wizard.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the on-screen instructions to complete the installation. You&#8217;ll need to provide some basic information such as your site title, username, password, and email address.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the installation is complete, you can log in to the WordPress dashboard and start customizing your website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Congratulations! You have successfully installed WordPress on your Debian-based server. By following this comprehensive guide, you have set up a solid foundation for building your website or blog. From here, you can explore the vast array of WordPress themes, plugins, and customization options to create a unique online presence tailored to your needs. Happy blogging!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can view more information about WordPress at the <a href=\"https:\/\/wordpress.org\/\">official website<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Today you have learned how to install WordPress On debian.<\/p>\n","protected":false},"excerpt":{"rendered":"Today we are going to show you how to Install WordPress on Debian. WordPress has emerged as one&hellip;\n","protected":false},"author":3,"featured_media":5035,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"csco_singular_sidebar":"","csco_page_header_type":"","csco_appearance_grid":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_location_hash":"","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0,"footnotes":""},"categories":[2451],"tags":[22,2473],"coauthors":[49],"class_list":["post-5032","post","type-post","status-publish","format-standard","has-post-thumbnail","category-wordpress","tag-debian","tag-wordpress","cs-entry","cs-video-wrap"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Install WordPress On Debian | Sebae Networks<\/title>\n<meta name=\"description\" content=\"View How To Install WordPress On Debian for free, here at Sebae. Discover more great posts on our website.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Install WordPress On Debian | Sebae Networks\" \/>\n<meta property=\"og:description\" content=\"View How To Install WordPress On Debian for free, here at Sebae. Discover more great posts on our website.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/\" \/>\n<meta property=\"og:site_name\" content=\"Sebae Networks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sebaenetworks\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-06T16:36:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-06T22:22:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2024\/03\/wordpress-header.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ian Tobin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@sebaenetworks\" \/>\n<meta name=\"twitter:site\" content=\"@sebaenetworks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ian Tobin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Install WordPress On Debian | Sebae Networks","description":"View How To Install WordPress On Debian for free, here at Sebae. Discover more great posts on our website.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/","og_locale":"en_GB","og_type":"article","og_title":"How To Install WordPress On Debian | Sebae Networks","og_description":"View How To Install WordPress On Debian for free, here at Sebae. Discover more great posts on our website.","og_url":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/","og_site_name":"Sebae Networks","article_publisher":"https:\/\/www.facebook.com\/sebaenetworks","article_published_time":"2024-03-06T16:36:45+00:00","article_modified_time":"2024-03-06T22:22:04+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2024\/03\/wordpress-header.jpg","type":"image\/jpeg"}],"author":"Ian Tobin","twitter_card":"summary_large_image","twitter_creator":"@sebaenetworks","twitter_site":"@sebaenetworks","twitter_misc":{"Written by":"Ian Tobin","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/#article","isPartOf":{"@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/"},"author":{"name":"Ian Tobin","@id":"https:\/\/www.sebae.net\/blog\/#\/schema\/person\/7d29331c5d1ce6cf39d0f9fe0ea76038"},"headline":"How To Install WordPress On Debian","datePublished":"2024-03-06T16:36:45+00:00","dateModified":"2024-03-06T22:22:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/"},"wordCount":583,"commentCount":0,"publisher":{"@id":"https:\/\/www.sebae.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2024\/03\/wordpress-header.jpg","keywords":["debian","wordpress"],"articleSection":["WordPress"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/","url":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/","name":"How To Install WordPress On Debian | Sebae Networks","isPartOf":{"@id":"https:\/\/www.sebae.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/#primaryimage"},"image":{"@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/#primaryimage"},"thumbnailUrl":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2024\/03\/wordpress-header.jpg","datePublished":"2024-03-06T16:36:45+00:00","dateModified":"2024-03-06T22:22:04+00:00","description":"View How To Install WordPress On Debian for free, here at Sebae. Discover more great posts on our website.","breadcrumb":{"@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/#primaryimage","url":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2024\/03\/wordpress-header.jpg","contentUrl":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2024\/03\/wordpress-header.jpg","width":1920,"height":1080,"caption":"WordPress Header"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sebae.net\/blog\/how-to-install-wordpress-on-debian\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sebae.net\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Install WordPress On Debian"}]},{"@type":"WebSite","@id":"https:\/\/www.sebae.net\/blog\/#website","url":"https:\/\/www.sebae.net\/blog\/","name":"Sebae Networks","description":"Tech Tips, News, Tutorials &amp; Advice","publisher":{"@id":"https:\/\/www.sebae.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sebae.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/www.sebae.net\/blog\/#organization","name":"Sebae","url":"https:\/\/www.sebae.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.sebae.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2023\/06\/sebae-logo-icon.png","contentUrl":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2023\/06\/sebae-logo-icon.png","width":512,"height":512,"caption":"Sebae"},"image":{"@id":"https:\/\/www.sebae.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sebaenetworks","https:\/\/x.com\/sebaenetworks"]},{"@type":"Person","@id":"https:\/\/www.sebae.net\/blog\/#\/schema\/person\/7d29331c5d1ce6cf39d0f9fe0ea76038","name":"Ian Tobin","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2021\/10\/avatar_user_3_1634496281-96x96.png3565f318d6daa8c0231d3ff35f9ccb2e","url":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2021\/10\/avatar_user_3_1634496281-96x96.png","contentUrl":"https:\/\/www.sebae.net\/blog\/wp-content\/uploads\/2021\/10\/avatar_user_3_1634496281-96x96.png","caption":"Ian Tobin"},"description":"Ian is a passionate Infrastructure Engineer\/Architect and Certified in technologies such as Microsoft and Citrix. He started his IT career at a young age and has over 30 years experience in the industry. His first ever computer was an Atari ST.","sameAs":["https:\/\/www.sebae.net"],"url":"https:\/\/www.sebae.net\/blog\/author\/itobin\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/posts\/5032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/comments?post=5032"}],"version-history":[{"count":2,"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/posts\/5032\/revisions"}],"predecessor-version":[{"id":5085,"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/posts\/5032\/revisions\/5085"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/media\/5035"}],"wp:attachment":[{"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/media?parent=5032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/categories?post=5032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/tags?post=5032"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.sebae.net\/blog\/wp-json\/wp\/v2\/coauthors?post=5032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}