{"id":41379,"date":"2022-07-06T12:30:43","date_gmt":"2022-07-06T17:30:43","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=41379"},"modified":"2022-12-05T06:36:07","modified_gmt":"2022-12-05T12:36:07","slug":"how-to-install-wordpress-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/","title":{"rendered":"How to Install WordPress on Ubuntu 22.04"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"size-full wp-image-42448 alignnone\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04.webp\" alt=\"how to install wordpress on ubuntu 22.04\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04.webp 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04-300x150.webp 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04-150x75.webp 150w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>WordPress is a very popular CMS and it remains the easiest and best open-source application for building websites. People mostly use WordPress for blogging, although actually it also supports other types of CMS like e-commerce, forums, etc.<\/p>\n<p>It offers you the freedom to build anything you want, it has thousands of plugins and themes that you can use to customize your website. The installation is fairly easy, you can simply follow the steps in this tutorial and you will learn how to install WordPress on <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting\/\">Ubuntu 22.04<\/a>.<\/p>\n<p><!--more--><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d0f70a2d7f9\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d0f70a2d7f9\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#Prerequisites\" >Prerequisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#Step-1-Log-in-to-your-server-via-SSH\" >Step 1: Log in to your server via SSH<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#Step-2-Update-the-system\" >Step 2: Update the system<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#Step-3-Install-SSL-Certificate\" >Step 3: Install SSL Certificate<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#Step-4-Install-PHP-81\" >Step 4: Install PHP 8.1<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#Step-5-Install-and-Configure-Web-Server\" >Step 5: Install and Configure Web Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#Step-6-Install-MariaDB-Server-and-Create-a-Database\" >Step 6: Install MariaDB Server and Create a Database<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#Step-7-Install-WordPress-using-WP-CLI\" >Step 7: Install WordPress using WP-CLI<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li>An Ubuntu 22.04 VPS<\/li>\n<li>Full SSH root access or a user with sudo privileges is required<\/li>\n<li>A domain or subdomain name, pointing to your server IP address<\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Log-in-to-your-server-via-SSH\"><\/span>Step 1: Log in to your server via SSH<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>First, you will need to log in to your Ubuntu 22.04 VPS via SSH as the root user:<\/p>\n<pre>ssh root@IP_Address -p Port_number<\/pre>\n<p>You will need to replace &#8216;IP_Address&#8217; and &#8216;Port_number&#8217; with your server&#8217;s actual IP address and SSH port number. Additionally, replace &#8216;root&#8217; with the username of the system user with sudo privileges.<\/p>\n<p>You can check whether you have the proper Ubuntu version installed on your server with the following command:<\/p>\n<pre># lsb_release -a<\/pre>\n<p>It will return an output like this.<\/p>\n<pre>No LSB modules are available.\r\nDistributor ID: Ubuntu\r\nDescription: Ubuntu 22.04 LTS\r\nRelease: 22.04\r\nCodename: jammy<\/pre>\n<p>We will use &#8216;root&#8217; in this article when running the shell commands. If you want to use your regular user with sudo privileges to run the commands, make sure to append &#8216;sudo&#8217; in front of the commands.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Update-the-system\"><\/span>Step 2: Update the system<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before starting, you have to make sure that all Ubuntu 22.04 packages installed on the server are up to date. You can do this by running the following commands:<\/p>\n<pre># apt update\r\n# apt upgrade<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-3-Install-SSL-Certificate\"><\/span>Step 3: Install SSL Certificate<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In this article, WordPress will be installed on the secured protocol (HTTPS). So, we need to install an SSL certificate before we can proceed with the other steps.<\/p>\n<pre># apt install python3-certbot-nginx -y<\/pre>\n<p>Prior to generating a new SSL certificate for your wordpress.example.com, make sure you pointed the domain\/subdomain DNS A record to your server IP address already. If Certbot is unable to generate a free SSL certificate, most likely the DNS update is not fully propagated.<\/p>\n<pre># certbot certonly --non-interactive --agree-tos -m you@example.com -d wordpress.example.com --standalone<\/pre>\n<p>If successful, you will see an output like this:<\/p>\n<pre>Saving debug log to \/var\/log\/letsencrypt\/letsencrypt.log\r\nRequesting a certificate for wordpress.example.com\r\n\r\nSuccessfully received certificate.\r\nCertificate is saved at: \/etc\/letsencrypt\/live\/wordpress.example.com\/fullchain.pem\r\nKey is saved at: \/etc\/letsencrypt\/live\/wordpress.example.com\/privkey.pem\r\nThis certificate expires on 2022-08-06.\r\nThese files will be updated when the certificate renews.\r\nCertbot has set up a scheduled task to automatically renew this certificate in the background.\r\n\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\nIf you like Certbot, please consider supporting our work by:\r\n* Donating to ISRG \/ Let's Encrypt: https:\/\/letsencrypt.org\/donate\r\n* Donating to EFF: https:\/\/eff.org\/donate-le\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Install-PHP-81\"><\/span>Step 4: Install PHP 8.1<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Ubuntu 22.04 ships with PHP 8.1 as the default PHP version. We are going to use this PHP version for our <a href=\"https:\/\/www.rosehosting.com\/wordpress-hosting\">WordPress website<\/a>. Run this command below to install PHP 8.1 and its required extensions.<\/p>\n<pre># apt install php-{curl,fpm,imagick,mbstring,mysql,xml,zip}<\/pre>\n<p>Once completed, the PHP-FPM service will be running automatically. We are not going to edit the PHP-FPM configuration. We will use the default PHP-FPM www.conf file. To ensure PHP-FPM is running, you can verify it with this command:<\/p>\n<pre># systemctl status php8.1-fpm<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-5-Install-and-Configure-Web-Server\"><\/span>Step 5: Install and Configure Web Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Nginx is a fast and secure web server and one of the most popular and widely used web servers in the world. To install the Nginx web server on Ubuntu 22.04 run the following command:<\/p>\n<pre># apt install nginx<\/pre>\n<p>Next, let&#8217;s create a new nginx server block for our WordPress website.<\/p>\n<pre># nano \/etc\/nginx\/conf.d\/wprdpress.conf<\/pre>\n<p>Paste the following into the new file.<\/p>\n<pre>upstream php-handler {\r\nserver unix:\/run\/php\/php8.1-fpm.sock;\r\n}\r\n\r\nserver {\r\nlisten 80;\r\nserver_name wordpress.example.com;\r\nreturn 301 https:\/\/$server_name$request_uri;\r\n}\r\n\r\nserver {\r\nlisten 443 ssl http2;\r\nserver_name wordpress.example.com;\r\n\r\n# Path to the root of your installation\r\nroot \/var\/www\/wordpress;\r\nindex index.php;\r\n\r\nssl_certificate \/etc\/letsencrypt\/live\/wordpress.example.com\/fullchain.pem;\r\nssl_certificate_key \/etc\/letsencrypt\/live\/wordpress.example.com\/privkey.pem;\r\n\r\n# Prevent nginx HTTP Server Detection\r\nserver_tokens off;\r\n\r\naccess_log \/var\/log\/nginx\/wordpress_access.log;\r\nerror_log \/var\/log\/nginx\/wordpress_error.log;\r\n\r\nclient_max_body_size 64M;\r\n\r\nlocation \/ {\r\ntry_files $uri $uri\/ \/index.php?$args;\r\n}\r\n\r\nlocation ~ \\.php$ {\r\ntry_files $uri =404;\r\ninclude \/etc\/nginx\/fastcgi_params;\r\nfastcgi_read_timeout 3600s;\r\nfastcgi_buffer_size 128k;\r\nfastcgi_buffers 4 128k;\r\nfastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\nfastcgi_pass php-handler;\r\nfastcgi_index index.php;\r\n}\r\n\r\n}<\/pre>\n<p>Make sure to replace wordpress.example.com with your actual domain or subdomain name. Save and close the file.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-6-Install-MariaDB-Server-and-Create-a-Database\"><\/span>Step 6: Install MariaDB Server and Create a Database<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The next step is to install the MariaDB server which will be used for the data storage of your WordPress site.<\/p>\n<p>To install the MariaDB server, invoke this command:<\/p>\n<pre># apt install mariadb-server<\/pre>\n<p>After the installation is completed, we can proceed with creating a new database and database user.<\/p>\n<pre># mysql<\/pre>\n<p>Once logged in to the MySQL shell, we can run the following commands.<\/p>\n<pre>mysql&gt; CREATE DATABASE wordpress_db;\r\nmysql&gt; CREATE USER wordpress_user@localhost IDENTIFIED BY 'm0d1fyth15';\r\nmysql&gt; GRANT ALL PRIVILEGES ON wordpress_db.* TO wordpress_user@localhost;\r\nmysql&gt; FLUSH PRIVILEGES;\r\nmysql&gt; \\q<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Step-7-Install-WordPress-using-WP-CLI\"><\/span>Step 7: Install WordPress using WP-CLI<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In this step, we are going to download WP-CLI and use it to install WordPress. WP-CLI is a tool to manage your WordPress installation through a command-line interface.<\/p>\n<pre># wget https:\/\/raw.githubusercontent.com\/wp-cli\/builds\/gh-pages\/phar\/wp-cli.phar -O \/usr\/local\/bin\/wp<\/pre>\n<p>The command above will download wp-cli.phar file and save it as \/usr\/local\/bin\/wp, so you can just type &#8216;wp&#8217; in your command. But first, let&#8217;s make the file executable.<\/p>\n<pre># chmod +x \/usr\/local\/bin\/wp<\/pre>\n<p>Now, you should be able to run &#8216;wp&#8217;, for example<\/p>\n<pre># sudo -u www-data wp --info<\/pre>\n<p>This will return an output like this:<\/p>\n<pre>root@ubuntu22:\/var\/www\/html# sudo -u www-data wp --info\r\nOS: Linux 5.15.0-1004-gcp #7-Ubuntu SMP Wed Apr 20 04:26:07 UTC 2022 x86_64\r\nShell: \/usr\/sbin\/nologin\r\nPHP binary: \/usr\/bin\/php8.1\r\nPHP version: 8.1.2\r\nphp.ini used: \/etc\/php\/8.1\/cli\/php.ini\r\nMySQL binary: \/usr\/bin\/mysql\r\nMySQL version: mysql Ver 15.1 Distrib 10.6.7-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper\r\nSQL modes: \r\nWP-CLI root dir: phar:\/\/wp-cli.phar\/vendor\/wp-cli\/wp-cli\r\nWP-CLI vendor dir: phar:\/\/wp-cli.phar\/vendor\r\nWP_CLI phar path: \/var\/www\/html\r\nWP-CLI packages dir: \r\nWP-CLI global config: \r\nWP-CLI project config: \r\nWP-CLI version: 2.6.0<\/pre>\n<p>Next, let&#8217;s create a directory for our WordPress website&#8217;s document root then download the latest version of WordPress.<\/p>\n<pre># mkdir \/var\/www\/wordpress \r\n# cd \/var\/www\/wordpress \r\n# chown -R www-data: \/var\/www\r\n<\/pre>\n<p>To download WordPress core files, simply run this command below.<\/p>\n<pre># sudo -u www-data wp core download<\/pre>\n<p>You can see that \/var\/www\/wordpress\/ has WordPress core files, you can list them with &#8216;ll&#8217; command.<\/p>\n<pre>root@ubuntu22:\/var\/www\/wordpress# ll\r\ntotal 224\r\ndrwxr-xr-x 5 www-data www-data 4096 May 8 11:27 .\/\r\ndrwxr-xr-x 4 root root 4096 May 8 11:27 ..\/\r\n-rw-r--r-- 1 www-data www-data 405 May 8 11:27 index.php\r\n-rw-r--r-- 1 www-data www-data 19915 May 8 11:27 license.txt\r\n-rw-r--r-- 1 www-data www-data 7437 May 8 11:27 readme.html\r\n-rw-r--r-- 1 www-data www-data 7165 May 8 11:27 wp-activate.php\r\ndrwxr-xr-x 9 www-data www-data 4096 May 8 11:27 wp-admin\/\r\n-rw-r--r-- 1 www-data www-data 351 May 8 11:27 wp-blog-header.php\r\n-rw-r--r-- 1 www-data www-data 2338 May 8 11:27 wp-comments-post.php\r\n-rw-r--r-- 1 www-data www-data 3001 May 8 11:27 wp-config-sample.php\r\ndrwxr-xr-x 4 www-data www-data 4096 May 8 11:27 wp-content\/\r\n-rw-r--r-- 1 www-data www-data 3939 May 8 11:27 wp-cron.php\r\ndrwxr-xr-x 26 www-data www-data 16384 May 8 11:27 wp-includes\/\r\n-rw-r--r-- 1 www-data www-data 2496 May 8 11:27 wp-links-opml.php\r\n-rw-r--r-- 1 www-data www-data 3900 May 8 11:27 wp-load.php\r\n-rw-r--r-- 1 www-data www-data 47916 May 8 11:27 wp-login.php\r\n-rw-r--r-- 1 www-data www-data 8582 May 8 11:27 wp-mail.php\r\n-rw-r--r-- 1 www-data www-data 23025 May 8 11:27 wp-settings.php\r\n-rw-r--r-- 1 www-data www-data 31959 May 8 11:27 wp-signup.php\r\n-rw-r--r-- 1 www-data www-data 4747 May 8 11:27 wp-trackback.php\r\n-rw-r--r-- 1 www-data www-data 3236 May 8 11:27 xmlrpc.php<\/pre>\n<p>As you can see, there is no wp-config.php in the directory. Let&#8217;s proceed with creating the wp-config.php file. but before running the command below, make sure you replace the database name, database username, and password.<\/p>\n<pre># sudo -u www-data wp core config --dbhost=localhost --dbname=wordpress_db --dbuser=wordpress_user --dbpass=m0d1fyth15<\/pre>\n<p>You will see a message that the wp-config.php file is generated.<\/p>\n<p>Now we have the wp-config.php file, and we can proceed with installing WordPress. Let&#8217;s run this command to install it, you can modify the information in the command below before running it.<\/p>\n<pre># sudo -u www-data wp core install --url=https:\/\/wordpress.example.com\/ --title=\"New WordPress Website\" --admin_name=wrdpadmin --admin_password=m0d1fyth15 --admin_email=you@yourdomain.com<\/pre>\n<p>You will see a successful message like this:<\/p>\n<pre>Success: WordPress installed successfully.<\/pre>\n<p>That&#8217;s it. You have successfully installed <a href=\"https:\/\/www.rosehosting.com\/wordpress-hosting\/\">WordPress<\/a> at https:\/\/wordpress.example.com\/ and you can open it using any web browser you like, then build and customize it.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-large wp-image-41382\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/05\/wordpress-1024x583.jpg\" alt=\"\" width=\"1024\" height=\"583\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/05\/wordpress-1024x583.jpg 1024w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/05\/wordpress-300x171.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/05\/wordpress-150x85.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/05\/wordpress-768x437.jpg 768w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/05\/wordpress-1320x752.jpg 1320w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/05\/wordpress.jpg 1529w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>If you are one of our web hosting customers and use our managed Linux Hosting, you don\u2019t have to follow this tutorial and install WordPress on <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting\/\">Ubuntu 22.04<\/a> yourself, our Linux admins will set up and configure a WordPress VPS for you. They are available 24\u00d77 and will take care of your request immediately, and all you need to do is to submit a ticket.<\/p>\n<p>PS. If you liked this post please share it with your friends on social networks or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress is a very popular CMS and it remains the easiest and best open-source application for building websites. People mostly &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install WordPress on Ubuntu 22.04\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#more-41379\" aria-label=\"Read more about How to Install WordPress on Ubuntu 22.04\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":42448,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1698],"tags":[2012,148],"class_list":["post-41379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","tag-ubuntu-22-04","tag-wordpress","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install WordPress on Ubuntu 22.04 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Follow the steps in this tutorial and to learn how to install Wordpress on Ubuntu 22.04.\" \/>\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.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install WordPress on Ubuntu 22.04\" \/>\n<meta property=\"og:description\" content=\"Follow the steps in this tutorial and to learn how to install Wordpress on Ubuntu 22.04.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-06T17:30:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-05T12:36:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install WordPress on Ubuntu 22.04\" \/>\n<meta name=\"twitter:description\" content=\"Follow the steps in this tutorial and to learn how to install Wordpress on Ubuntu 22.04.\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install WordPress on Ubuntu 22.04\",\"datePublished\":\"2022-07-06T17:30:43+00:00\",\"dateModified\":\"2022-12-05T12:36:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/\"},\"wordCount\":917,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/how-to-install-wordpress-on-ubuntu-22.04.webp\",\"keywords\":[\"ubuntu 22.04\",\"wordpress\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/\",\"name\":\"How to Install WordPress on Ubuntu 22.04 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/how-to-install-wordpress-on-ubuntu-22.04.webp\",\"datePublished\":\"2022-07-06T17:30:43+00:00\",\"dateModified\":\"2022-12-05T12:36:07+00:00\",\"description\":\"Follow the steps in this tutorial and to learn how to install Wordpress on Ubuntu 22.04.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/how-to-install-wordpress-on-ubuntu-22.04.webp\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/how-to-install-wordpress-on-ubuntu-22.04.webp\",\"width\":742,\"height\":372,\"caption\":\"how to install wordpress on ubuntu 22.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-wordpress-on-ubuntu-22-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install WordPress on Ubuntu 22.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install WordPress on Ubuntu 22.04 | RoseHosting","description":"Follow the steps in this tutorial and to learn how to install Wordpress on Ubuntu 22.04.","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.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install WordPress on Ubuntu 22.04","og_description":"Follow the steps in this tutorial and to learn how to install Wordpress on Ubuntu 22.04.","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2022-07-06T17:30:43+00:00","article_modified_time":"2022-12-05T12:36:07+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04.webp","type":"image\/webp"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_title":"How to Install WordPress on Ubuntu 22.04","twitter_description":"Follow the steps in this tutorial and to learn how to install Wordpress on Ubuntu 22.04.","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install WordPress on Ubuntu 22.04","datePublished":"2022-07-06T17:30:43+00:00","dateModified":"2022-12-05T12:36:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/"},"wordCount":917,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04.webp","keywords":["ubuntu 22.04","wordpress"],"articleSection":["Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/","name":"How to Install WordPress on Ubuntu 22.04 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04.webp","datePublished":"2022-07-06T17:30:43+00:00","dateModified":"2022-12-05T12:36:07+00:00","description":"Follow the steps in this tutorial and to learn how to install Wordpress on Ubuntu 22.04.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04.webp","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/06\/how-to-install-wordpress-on-ubuntu-22.04.webp","width":742,"height":372,"caption":"how to install wordpress on ubuntu 22.04"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-wordpress-on-ubuntu-22-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install WordPress on Ubuntu 22.04"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/41379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=41379"}],"version-history":[{"count":13,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/41379\/revisions"}],"predecessor-version":[{"id":43711,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/41379\/revisions\/43711"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/42448"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=41379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=41379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=41379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}