Spread over 8 likely you also eager to know how to install WordPress via the VPS then.Actually, if you have experience using Shared Host, only read all MySQL is already installed WordPress can be.
However, if you have decided not to use any control panel (such as you are learning under this series), I encourage you to use WP-CLI to install WordPress on governance and VPS.
WP-CLI is a tool that can say that there is no limit creativity, your application it is good or not is by your creativity on its available features. It not only supports you install a new WordPress website quickly on VPS that can help you do many things like updating plugins / themes, fix the database, database optimization, and even supports data transfer from a Other websites of the fastest (if your current website in old server using WP-CLI).
Contents content
I. Introduction and how to install WP CLI
II. How to install WordPress with WP CLI
III. Moving a WordPress website from another host on VPS
Epilogue
I. Introduction and how to install WP CLI
WP-CLI has introduced himself quite adequate here , as well as how to install it, so I did not write it here.
II. How to install WordPress with WP CLI
Using WP-CLI Guide to install your new WordPress site also has instructions here back then, but his features or worry, so in this article I will narrate what we have learned in the previous sections to install is a WordPress site on the VPS under this series.
- Step 1. Adding domain by creating VirtualHost
- Step 2. Creating a new database and database user
- Step 3. Installing WP-CLI
Ok, there are 3 steps you need to prepare. Let us now proceed to install a new WordPress site with WP-CLI okay.
First, you cd into the public_html directory in VirtualHost folders that you added. For example, his /home/webdata/domains/thachpham.dev/public_html.
1
| sudo cd / home / webdata / thachpham .dev / public_html |
Then proceed to run the following command to download the WordPress source folder you are browsing.
1
| sudo core wp download --allow-root |
Results returned after the download is complete:
1
2
3
| [Thach @ vpscanban public_html] $ sudo core wp download --allow-root Downloading WordPress 4.0 (en_US) ... Success: WordPress downloaded. |
Next, customize the file wp-config php with database information you created:
1
| sudo wp = dulieu1 --dbuser --dbname core config = dulieu1_user --dbpass = 123456 --allow-root |
Outputs:
1
2
| [Thach @ vpscanban public_html] $ sudo wp = dulieu1 --dbuser --dbname core config = dulieu1_user --dbpass = 123456 --allow-root Success: wp-config.php file Generated. |
Finally, the command to install the settings that you want, or you can also access your domain settings as usual.
1
| sudo wp core install --url = http: // thachpham .dev --title = Hoc VPS can ban --admin_user = thachpham2014 --admin_password = 123456 --admin_email=contact@thachpham.com --allow-root |
Outputs:
1
2
| [Thach @ vpscanban public_html] $ sudo install wp core --url = http: //thachpham.dev --title = HocVPScanban --admin_user = thachpham2014 --admin_password = 123456 --admin_email=contact@thachpham.com --allow- root Success: WordPress installed SUCCESSFULLY. |
Next is the apache user and group apache owned files and directories in the directory of your WordPress installation so no need to CHMOD when uploading photos, install the plugin , and it is important not to ask accounts FTP, SFTP when install themes / plugins.
1
| sudo chown -R apache: apache * |
Remember that you have access to the directory is public_html okay.
The final step is to enable mod_rewrite on a VPS to use offline permalink. Please open the file /etc/httpd/conf/httpd.conf and find AllowOverride None then changed to AllowOverride All . Then restart Apache:
1
| sudo service httpd restart |
Ok completed the installation steps here, so now you can visit the website to find your WordPress website has been successfully installed on the VPS.
See also WP-CLI command here.
Now you can use WordPress as usual and then, and almost no problems when installing the plugin for Apache compatible both with WordPress very well. You also have Chown WordPress folder and should not need to CHMOD the file to upload or install the plugin, everything goes completely automated.
III. Moving a WordPress website from another host on VPS
Surely everyone here has a separate WordPress sites so will need to learn how to move a WordPress website from another host on this VPS to use.
Transfer Guide VPS host I had written about in great detail here , so you can see through, and you almost identical so do not even something else.
Only instead of chown for user and group nginx nginx, you will chown to apache user and group apache.
Epilogue
That's what you need to convey in this article. Honestly using WordPress on a VPS is not only much here but I would like to pause here because their serie believe that over 10 articles in this series you have to understand the nature VPS is like, and how to use use it.
And things like install phpMyAdmin, you can find more online tutorial, very easy to implement.
If you're really familiar with VPS then, I encourage you to use other WordPress on a webserver Apache powerful and a lot faster which is nginx. If you have not been through nginx then track series Centminmod & WordPress nginx is to know how it will feel its power.
If you need to learn more about Linux commands as well as the need to understand more about it, here are some resources you can check out:
- Unix Toolbox - Collection manual for the UNIX command line.
- Linux Command Line - Ebook Free taught using the Linux command line.
- Linux Security for Beginner - Security Linux for beginners.
- Linux Resources - General Linux learning resources.
Do not forget to add track procedure for VPS / Dedicated Server tag in your VPS okay.
If you find this series useful, please share it! And do not forget to comment if you find yourself with the wrong instructions or need something additional.
0 nhận xét:
Post a Comment