Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»CMS»How to Install Latest WordPress on CentOS, RHEL & Fedora

    How to Install Latest WordPress on CentOS, RHEL & Fedora

    RahulBy RahulAugust 17, 20143 Mins ReadUpdated:October 22, 2017

    WordPress is the most popular content management system. Its created with PHP programming language and uses MySQL as the backend database. This article will help you to install latest WordPress on LAMP environment on CentOS, RHEL & Fedora systems. For this tutorial, we assume that you already have LAMP setup on your system. If you do not have LAMP setup use below article to install it. Setup LAMP Stack on CentOS, RHEL and Fedora

    install WordPress with LAMP

    Step 1 – Download Latest WordPress

    These latest version of WordPress are always available here (.tar.gz) and here (.zip). You can download any files to your system. Use belwo command to download gzip file of latest WordPress to your system using the following command.

    $ cd /var/www/html
    $ wget https://wordpress.org/latest.tar.gz
    

    Extract the downloaded archive to the document root of your domain and update permissions on files.

    $ tar xzf latest.tar.gz
    $ chown -R apache.apache wordpress
    $ chmod -R 755 wordpress
    

    Step 2 – Create MySQL Database and User

    After extracting code we need to create a MySQL database and user account for configuring WordPress. Use following set of commands to create database and user after login with the privileged user.

    # mysql -u root -p
    

    1
    2
    3
    4
    mysql> CREATE DATABASE wp_db;
    mysql> GRANT ALL ON wp_db.* to 'wp_user'@'localhost' IDENTIFIED BY '_secret_password_';
    mysql> FLUSH PRIVILEGES;
    mysql> quit

    Step 3 – Configure Apache VirtualHost

    Now the time is to create and configure apache configuration file and add a new virtual host for WordPress setup like below.

    # vim /etc/httpd/conf/httpd.conf
    

    Add following setting at end of file

    <VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot /var/www/html/wordpress
        ServerName svr1.tecadmin.net
        <Directory "/var/www/html/wordpress">
             Allowoverride All
         </Directory>
        ErrorLog logs/svr1.tecadmin.net-error_log
        CustomLog logs/svr1.tecadmin.net-access_log combined
    </VirtualHost>
    

    If you already have another virtual host created in the config file, make sure to enable NameVirtulHost for using multiple VirtualHosts.

    Reload Apache service to read configuration file again.

    $ systemctl restart httpd.service
    

    Step 4 – Install Latest WordPress with Web Installer

    WordPress provides a web installer for easy to setup WordPress without editing files manually. After completing above steps just point your browser to your domain.

    4.1. Open URL in Browser and Click on Create a configuration file.

    wordpress-setup-1

    4.2 In this step just click on Let’s Go button.

    wordpress-setup-2

    4.3. Fill the database details and click “Submit“.

    wordpress-setup-3

    4.4 After submitting database details, click on “Run the Install“.

    wordpress-setup-4

    4.5 Enter following details for your WordPress Install and click on Install WordPress Button

    • Blog Title
    • Username of admin account (for security do not use as “admin”)
    • Admin password ( twice )
    • Email ID

    wordpress-setup-5

    4.6 After completing above step, You have installed WordPress successfully, Now you will get WordPress success installation message.

    wordpress-setup-6

    Step 5 – Login To WordPress Admin Panel

    After completing installation, you will be redirected to admin panel login screen or you can open url in browser like below

     http://svr1.tecadmin.net/wp-admin/
    

    wordpress-setup-7

    After entering correct login details, you will be redirected to WordPress admin dashboard. where you can create a beautiful blog and connect with the world.

    wordpress-setup-8-dashboard

    Congratulation! You have successfully installed WordPress.

    CMS Content Management System Install WordPress WordPress WP
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Enable KeepAlive in Apache on CentOS/RHEL
    Next Article Configure MAC based Filtering using Iptables in Linux

    Related Posts

    How To Install and Configure Drupal on Fedora 35/34

    Updated:February 15, 20224 Mins Read

    How to Install Moodle 3.8 on Fedora 32/31/30

    Updated:May 12, 20202 Mins Read

    Update WordPress Ping List to Quick Index of Posts

    Updated:January 23, 20182 Mins Read

    How to Install Joomla 3.9 CMS on Ubuntu, Debian, LinuxMint

    Updated:October 23, 20192 Mins Read

    Reset WordPress Admin Password via SQL or phpMyAdmin

    Updated:December 5, 20171 Min Read

    Top 5 WordPress Security Plugins To Keep Your Website Safe

    Updated:March 30, 20175 Mins Read

    8 Comments

    1. Christien on December 12, 2014 6:23 am

      Hi Rahul,

      I’ve followed your steps and confirmed that the FastCGI module is enabled using the php_info file but I still can’t upload anything to WordPress… I’m getting the same error Evon was getting. Isn’t this suppose to make 755 work so that I don’t have to use an insecure 777???

      Please confirm,
      CP

      Reply
    2. evon on October 28, 2014 8:30 am

      Hey
      i have every step but i get this error
      Unable to create directory wp-content/uploads/2014/10. Is its parent directory writable by the server?

      its my second installation. i have even changed the permission to 777. this is a local installtion
      what could the issue.

      Reply
      • Rahul on October 28, 2014 4:52 pm

        Hi Evon,

        Have you setup proper permissions on parent directories also like uploads, 2014 etc.

        Reply
    3. Jason on May 21, 2014 4:04 pm

      Awesome post. Please note that “” in the virtual host section should be “”.

      Reply
      • Jason on May 21, 2014 4:06 pm

        Ugh… the above didn’t past correctly… “” should be “”

        Reply
        • Jason on May 21, 2014 4:07 pm

          grrrr… “Directory” should be “/Directory”

          Reply
          • Rahul on May 22, 2014 3:21 am

            Hi Jason

            Thanks to inform.. I have make necessary changes in VirtualHost section..

            Reply
    4. Ayush Kumar on December 14, 2013 6:25 am

      Thanks for sharing steps.

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Import GPG Keys on Ubuntu & Debian (without apt-key)
    • How To Install Google Chrome On macOS
    • How to Install Minecraft on Ubuntu 22.04 & 20.04
    • Running a Cron job every Sunday (Weekly)
    • Running Multiple Commands At Once in Linux
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.