{"id":3735,"date":"2019-07-21T18:59:45","date_gmt":"2019-07-21T15:59:45","guid":{"rendered":"https:\/\/kifarunix.com\/?p=3735"},"modified":"2024-03-12T07:33:12","modified_gmt":"2024-03-12T04:33:12","slug":"install-wordpress-5-with-nginx-on-debian-10-buster","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-wordpress-5-with-nginx-on-debian-10-buster\/","title":{"rendered":"Install WordPress 5 with Nginx on Debian 10 Buster"},"content":{"rendered":"\n<p>In this guide, we are going to learn how to install <a aria-label=\"WordPress (opens in a new tab)\" href=\"https:\/\/wordpress.org\/support\/category\/getting-started\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress<\/a> 5 with Nginx on Debian 10 Buster.<\/p>\n\n\n\n<p>Are you using WordPress and looking for a professional WordPress website builder? Look no further since&nbsp;<a href=\"https:\/\/trk.elementor.com\/8uczdzzsxgza-webcreatorsred\" target=\"_blank\" rel=\"noreferrer noopener\">Elementor can help you create beautiful pages<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing WordPress 5 with Nginx on Debian 10 Buster<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Run system update<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update\napt upgrade<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install LAMP Stack on Debian 10 Buster<\/h3>\n\n\n\n<p>In order to run WordPress, you need to have either LEMP or LAMP stack installed already. You use LEMP stack if you want to run WordPress 5 with Nginx. If you want to use Apache, you need to use LAMP stack.<\/p>\n\n\n\n<p>To install LEMP stack on Debian 10 Buster, follow the link below;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-lemp-stack-on-debian-10-buster\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install LEMP Stack on Debian 10 Buster<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Create WordPress Database and User<\/h3>\n\n\n\n<p>This guide uses MariaDB 10 for WordPress Database. If you need to use MySQL 8, see the link below on how to install MySQL 8 on Debian 10 Buster.<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-mysql-8-on-debian-10-buster\/\" target=\"_blank\">Install MySQL 8 on Debian 10 Buster<\/a><\/p>\n\n\n\n<p>Login to your database server and create  WordPress database and a privileged database user.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>create database kifarunixdemo;\ncreate user demouser@localhost identified by 'Str0nGPassword';\ngrant all privileges on kifarunixdemo.* to demouser@localhost;\nflush privileges;\nquit<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install Extra PHP Extensions<\/h3>\n\n\n\n<p>While installing LEMP stack as in the link above, a few PHP modules were installed. To install other required php extensions, execute the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install php-curl php-gd php-intl php-mbstring php-soap php-xml php-xmlrpc php-zip<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-\u2014-configuring-nginx\">Configure Nginx<\/h3>\n\n\n\n<p>While configuring LEMP stack, you might have created an Nginx configuration file for your site. However, for the purposes of this demo, we are going to create a demo configuration file under, <strong>\/etc\/nginx\/sites-available\/<\/strong> as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/nginx\/sites-available\/kifarunix-demo<\/code><\/pre>\n\n\n\n<p>Next, put the content below on the configuration file. Besure to make appropriate adjustments.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n\tlisten 80;\n\troot \/var\/www\/html\/kifarunix-demo;\n\tserver_name kifarunix-demo.com;\n\n\tlocation \/ {\n\t    index\tindex.php index.html;\n\t    try_files\t$uri $uri\/ \/index.php?$args;\n\t}\t\n\n\tlocation ~ \\.php$ {\n\t\tinclude snippets\/fastcgi-php.conf;\n\t\tfastcgi_pass unix:\/run\/php\/php7.3-fpm.sock;\n\t\tfastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;\n\t}\n}<\/code><\/pre>\n\n\n\n<p>Save the configuration file and enable you site configuration by creating a symbolic link to the enabled sites directory.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ln -s \/etc\/nginx\/sites-available\/kifarunix-demo \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n\n\n\n<p>Verify Nginx configuration.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>nginx -t<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/code><\/pre>\n\n\n\n<p>Reload Nginx<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl reload nginx<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-\u2014-downloading-wordpress\">Download WordPress 5<\/h3>\n\n\n\n<p>Download the latest WordPress archive by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget https:\/\/wordpress.org\/latest.tar.gz -P \/tmp<\/code><\/pre>\n\n\n\n<p>Once the download is done, extract WordPress to your web root directory, <strong>\/var\/www\/html\/kifarunix-demo<\/strong>, in this demo.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>mkdir \/var\/www\/html\/kifarunix-demo<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>tar xzf \/tmp\/latest.tar.gz --strip-components=1 -C \/var\/www\/html\/kifarunix-demo<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Configure WordPress<\/h3>\n\n\n\n<p>Copy the sample WordPress configuration file and rename it as follows.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cp \/var\/www\/html\/kifarunix-demo\/wp-config{-sample,}.php<\/code><\/pre>\n\n\n\n<p>Next, you need to set the database connection settings and authentication keys and Salts.<\/p>\n\n\n\n<p>The database connection details (database, database user and password) are created above while configuring the database.<\/p>\n\n\n\n<p>The Authentication Keys and Salts can be generated by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>curl -s https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>define('AUTH_KEY',         '|WYo279FcL.j_ G$DOn;TXsH\/wP=&#91;$&#91;1i^+~`|;!w|!KIa1$R5`D,0&lt;V5prPa;m4');\ndefine('SECURE_AUTH_KEY',  'ojU%olj}N`1&lt;DgV_F?P=Xrc&#91;z|j*TH@Ll+.Xh&gt;=V|FM*K`@C^RWSPv{V.\/k){s ]');\ndefine('LOGGED_IN_KEY',    't&#91;8x41+V0D&gt;_jO4=#g*u{o|?Hy_$A(u?@-`0G5R6-n$i;Q=u!8+:0tT\/5:Q=8&lt;Vg');\ndefine('NONCE_KEY',        'z}yPWE]g=uo1Ex0rPS3S~kQ1A#.yBHi5W h^P)i}&gt;;_&#91;P`Zx,B%d5}.{q&gt;ZPMmLu');\ndefine('AUTH_SALT',        'MA) ~|J?G!X)uI+k@yT(*mUZBWsQiNPS]*^x-&lt;cp+DYA=J:N]7O+t_rU(^)@+kqv');\ndefine('SECURE_AUTH_SALT', 'Zjl&amp;O}$qz|f(sRSe%ZT*@SkCg.`Sm\/e0Z\/CEW&lt;|vRwOl}qbR!nzA-D&gt;X%eKGcV2E');\ndefine('LOGGED_IN_SALT',   'GBp!7=U*T~#-%Ly?FnS$qgYEzGnX1w3!Bo_ ]$o]EDj{wh,fe1NJK9VkI_n ;hTD');\ndefine('NONCE_SALT',       'fdTm,$h?vjzLS(yMKj!rR]0aZ*f(Q(\/t|cS|;o)%{GqCK4IxG-+fyL_Yan~ns4XF');<\/code><\/pre>\n\n\n\n<p><strong>Do&nbsp;NOT&nbsp;copy the Keys above<\/strong>. Be sure to use your own unique keys and salts.<\/p>\n\n\n\n<p>Hence, open the WordPress configuration file and edit it as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/var\/www\/html\/kifarunix-demo\/wp-config.php<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>...\n\/\/ ** MySQL settings - You can get this info from your web host ** \/\/\n\/** The name of the database for WordPress *\/\ndefine( 'DB_NAME', 'kifarunixdemo' );\n\n\/** MySQL database username *\/\ndefine( 'DB_USER', 'demouser' );\n\n\/** MySQL database password *\/\ndefine( 'DB_PASSWORD', 'Str0nGPassword' );\n\n\/** MySQL hostname *\/\ndefine( 'DB_HOST', 'localhost' );\n\n\/** Database Charset to use in creating database tables. *\/\ndefine( 'DB_CHARSET', 'utf8' );\n\n\/** The Database Collate type. Don't change this if in doubt. *\/\ndefine( 'DB_COLLATE', '' );\n...<\/code><\/pre>\n\n\n\n<p>Replace this;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\ndefine( 'AUTH_KEY',         'put your unique phrase here' );\ndefine( 'SECURE_AUTH_KEY',  'put your unique phrase here' );\ndefine( 'LOGGED_IN_KEY',    'put your unique phrase here' );\ndefine( 'NONCE_KEY',        'put your unique phrase here' );\ndefine( 'AUTH_SALT',        'put your unique phrase here' );\ndefine( 'SECURE_AUTH_SALT', 'put your unique phrase here' );\ndefine( 'LOGGED_IN_SALT',   'put your unique phrase here' );\ndefine( 'NONCE_SALT',       'put your unique phrase here' );\n...<\/code><\/pre>\n\n\n\n<p>With (generated above);<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define('AUTH_KEY',         '|WYo279FcL.j_ G$DOn;TXsH\/wP=&#91;$&#91;1i^+~`|;!w|!KIa1$R5`D,0&lt;V5prPa;m4');\ndefine('SECURE_AUTH_KEY',  'ojU%olj}N`1&lt;DgV_F?P=Xrc&#91;z|j*TH@Ll+.Xh&gt;=V|FM*K`@C^RWSPv{V.\/k){s ]');\ndefine('LOGGED_IN_KEY',    't&#91;8x41+V0D&gt;_jO4=#g*u{o|?Hy_$A(u?@-`0G5R6-n$i;Q=u!8+:0tT\/5:Q=8&lt;Vg');\ndefine('NONCE_KEY',        'z}yPWE]g=uo1Ex0rPS3S~kQ1A#.yBHi5W h^P)i}&gt;;_&#91;P`Zx,B%d5}.{q&gt;ZPMmLu');\ndefine('AUTH_SALT',        'MA) ~|J?G!X)uI+k@yT(*mUZBWsQiNPS]*^x-&lt;cp+DYA=J:N]7O+t_rU(^)@+kqv');\ndefine('SECURE_AUTH_SALT', 'Zjl&amp;O}$qz|f(sRSe%ZT*@SkCg.`Sm\/e0Z\/CEW&lt;|vRwOl}qbR!nzA-D&gt;X%eKGcV2E');\ndefine('LOGGED_IN_SALT',   'GBp!7=U*T~#-%Ly?FnS$qgYEzGnX1w3!Bo_ ]$o]EDj{wh,fe1NJK9VkI_n ;hTD');\ndefine('NONCE_SALT',       'fdTm,$h?vjzLS(yMKj!rR]0aZ*f(Q(\/t|cS|;o)%{GqCK4IxG-+fyL_Yan~ns4XF');<\/code><\/pre>\n\n\n\n<p>Save the configuration and quit.<\/p>\n\n\n\n<p>The WordPress configuration files should be owned the Web Server user. In this guide, we are using the default web server user, <strong>www-data<\/strong>. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>chown -R www-data:www-data \/var\/www\/html\/kifarunix-demo<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Finalize WordPress installation on Debian 10 Buster<\/h3>\n\n\n\n<p>The backend setup is done. Now to complete the installation of WordPress, navigate the browser and access WordPress using the address, <strong>http:\/\/&lt;server-domain_OR_IP&gt;<\/strong>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-installation-language.png\"><img loading=\"lazy\" decoding=\"async\" width=\"655\" height=\"627\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-installation-language.png\" alt=\"Install WordPress 5 with Nginx on Debian 10 Buster\" class=\"wp-image-3740\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>Choose the installation language and proceed.<\/p>\n\n\n\n<p>Next, set your Site title, username, password, email address and whether or not to allow search engines to index your website.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-configurations.png\"><img loading=\"lazy\" decoding=\"async\" width=\"755\" height=\"676\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-configurations.png\" alt=\"configuring WordPress on Debian 10 Buster\" class=\"wp-image-3741\" title=\"\"><\/a><\/figure><\/div>\n\n\n<p>Once you done, click install WordPress.<\/p>\n\n\n\n<p>A WordPress successful installation with login prompt opens up.  Click login and supply your username\/email and password.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-login.png\"><img loading=\"lazy\" decoding=\"async\" width=\"765\" height=\"391\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-login.png\" alt=\"WordPress 5 on Debian 10 Buster\" class=\"wp-image-3742\" title=\"\"><\/a><\/figure>\n\n\n\n<p>After successful authentication, you will land on WordPress dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-installed.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1353\" height=\"653\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-installed.png\" alt=\"WordPress 5 installed on Debian 10 Buster\" class=\"wp-image-3743\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-installed.png 1353w, https:\/\/kifarunix.com\/wp-content\/uploads\/2019\/07\/wordpress-installed-768x371.png 768w\" sizes=\"(max-width: 1353px) 100vw, 1353px\" \/><\/a><\/figure>\n\n\n\n<p>There you go. You have successfully installed WordPress 5 with Nginx on Debian 10 Buster.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Tutorials;<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-wordpress-5-with-nginx-on-fedora-30-fedora-29\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install WordPress 5 with Nginx on Fedora 30\/Fedora 29<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-wordpress-5-0-with-apache-on-fedora-29-fedora-28\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Install WordPress 5.0 with Apache on Fedora 29\/Fedora 28<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-use-wpscan-wordpress-vulnerability-scanner-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">How to Install and Use WPScan WordPress Vulnerability Scanner Ubuntu 18.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we are going to learn how to install WordPress 5 with Nginx on Debian 10 Buster. Are you using WordPress and looking<\/p>\n","protected":false},"author":1,"featured_media":12497,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,292],"tags":[1039,229,1047,1048],"class_list":["post-3735","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-wordpress","tag-debian-10-buster","tag-nginx","tag-wordpress","tag-wordpress-5-2-2","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3735"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=3735"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3735\/revisions"}],"predecessor-version":[{"id":21171,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/3735\/revisions\/21171"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/12497"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=3735"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=3735"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=3735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}