{"id":5572,"date":"2021-11-07T14:32:27","date_gmt":"2021-11-07T13:32:27","guid":{"rendered":"http:\/\/shakti.tattva.se\/?p=5572"},"modified":"2021-11-07T14:32:27","modified_gmt":"2021-11-07T13:32:27","slug":"install-new-wordpress","status":"publish","type":"post","link":"https:\/\/shakti.tattva.se\/index.php\/install-new-wordpress\/","title":{"rendered":"Install new wordpress"},"content":{"rendered":"<p>Create your own database. Connect to the MySQL console with this command.<\/p>\n<div class=\"highlight\">\n<div class=\"chroma open\">\n<div class=\"table-wrapper\">\n<table class=\"lntable\">\n<tbody>\n<tr>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code><span class=\"lnt\">1\n<\/span><\/code><\/pre>\n<\/td>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\">mysql -u root -p\n<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>After you type the password, you can start to create the database. Of course you can change the name of the database and the user.<\/p>\n<div class=\"highlight\">\n<div class=\"chroma open\">\n<div class=\"table-wrapper\">\n<table class=\"lntable\">\n<tbody>\n<tr>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code><span class=\"lnt\">1\n<\/span><span class=\"lnt\">2\n<\/span><span class=\"lnt\">3\n<\/span><span class=\"lnt\">4\n<\/span><\/code><\/pre>\n<\/td>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code class=\"language-sql\" data-lang=\"sql\"><span class=\"k\">CREATE<\/span> <span class=\"k\">DATABASE<\/span> <span class=\"n\">wordpress<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">CREATE<\/span> <span class=\"k\">USER<\/span> <span class=\"s1\">'wpuser'<\/span><span class=\"o\">@<\/span><span class=\"s1\">'localhost'<\/span> <span class=\"n\">IDENTIFIED<\/span> <span class=\"k\">BY<\/span> <span class=\"s1\">'password'<\/span><span class=\"p\">;<\/span>\n<span class=\"k\">GRANT<\/span> <span class=\"k\">ALL<\/span> <span class=\"k\">PRIVILEGES<\/span> <span class=\"k\">ON<\/span> <span class=\"n\">wordpress<\/span><span class=\"p\">.<\/span><span class=\"o\">*<\/span> <span class=\"k\">TO<\/span> <span class=\"s1\">'wpuser'<\/span><span class=\"o\">@<\/span><span class=\"s1\">'localhost'<\/span><span class=\"p\">;<\/span>\n<span class=\"n\">FLUSH<\/span> <span class=\"k\">PRIVILEGES<\/span><span class=\"p\">;<\/span>\n<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>FINALLY it\u2019s time to install WordPress inside the <em>\/raid\/srv\/vhosts\/domain.tattva.se\/http<\/em> folder.<\/p>\n<div class=\"highlight\">\n<div class=\"chroma open\">\n<div class=\"table-wrapper\">\n<table class=\"lntable\">\n<tbody>\n<tr>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code><span class=\"lnt\">1\n<\/span><span class=\"lnt\">2\n<\/span><span class=\"lnt\">3\n<\/span><span class=\"lnt\">4\n<\/span><\/code><\/pre>\n<\/td>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"nb\">cd<\/span> \/srv\/http\nwget https:\/\/wordpress.org\/latest.tar.gz\ntar xvzf latest.tar.gz\n<span class=\"nb\">mv wordpress\/* .<\/span><\/code><\/pre>\n<pre class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\"><span class=\"nb\">rmdir wordpress<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>Now you have to change the ownership of the folder wordpress to the http group.<\/p>\n<div class=\"highlight\">\n<div class=\"chroma open\">\n<div class=\"code-header language-bash\"><\/div>\n<div class=\"table-wrapper\">\n<table class=\"lntable\">\n<tbody>\n<tr>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code><span class=\"lnt\">1\n<\/span><\/code><\/pre>\n<\/td>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\">chown -R root:http \/srv\/http\/wordpress\n<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>The last step is to create the WordPress config file starting from the default one.<\/p>\n<div class=\"highlight\">\n<div class=\"chroma open\">\n<div class=\"table-wrapper\">\n<table class=\"lntable\">\n<tbody>\n<tr>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code><span class=\"lnt\">1\n<\/span><\/code><\/pre>\n<\/td>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\">cp wp-config-sample.php wp-config.php\n<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>All you have to do is opening the file<\/p>\n<div class=\"highlight\">\n<div class=\"chroma open\">\n<div class=\"code-header language-bash\"><\/div>\n<div class=\"table-wrapper\">\n<table class=\"lntable\">\n<tbody>\n<tr>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code><span class=\"lnt\">1\n<\/span><\/code><\/pre>\n<\/td>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code class=\"language-bash\" data-lang=\"bash\">emscs wp-config.php\n<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>and set the name of the database, the user and the password.<\/p>\n<div class=\"highlight\">\n<div class=\"chroma open\">\n<div class=\"table-wrapper\">\n<table class=\"lntable\">\n<tbody>\n<tr>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code><span class=\"lnt\">1\n<\/span><span class=\"lnt\">2\n<\/span><span class=\"lnt\">3\n<\/span><span class=\"lnt\">4\n<\/span><span class=\"lnt\">5\n<\/span><span class=\"lnt\">6\n<\/span><\/code><\/pre>\n<\/td>\n<td class=\"lntd\">\n<pre class=\"chroma\"><code class=\"language-php\" data-lang=\"php\"><span class=\"sd\">\/** The name of the database for WordPress *\/<\/span>\n<span class=\"nx\">define<\/span><span class=\"p\">(<\/span><span class=\"s1\">'DB_NAME'<\/span><span class=\"p\">,<\/span> <span class=\"s1\">'wordpress'<\/span><span class=\"p\">);<\/span>\n<span class=\"sd\">\/** MySQL database username *\/<\/span>\n<span class=\"nx\">define<\/span><span class=\"p\">(<\/span><span class=\"s1\">'DB_USER'<\/span><span class=\"p\">,<\/span> <span class=\"s1\">'wpuser'<\/span><span class=\"p\">);<\/span>\n<span class=\"sd\">\/** MySQL database password *\/<\/span>\n<span class=\"nx\">define<\/span><span class=\"p\">(<\/span><span class=\"s1\">'DB_PASSWORD'<\/span><span class=\"p\">,<\/span> <span class=\"s1\">'password'<\/span><span class=\"p\">);<\/span>\n<\/code><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>Now everything is done. To check if it is true, open the broswer and go to http:\/\/localhost\/wordpress and you should see a page like this.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/www.marcogomiero.com\/img\/arch\/wordpress.jpeg\" alt=\"image\" \/><\/figure>\n<p>Now you can go through the classic setup of WordPress. Enjoy it!<\/p>\n<p>&nbsp;<\/p>\n<p>from: https:\/\/medium.com\/@marcogomiero\/how-to-install-wordpress-on-arch-linux-23db216fd0a7<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create your own database. Connect to the MySQL console with this command. 1 mysql -u root -p After you type the password, you can start to create the database. Of course you can change the name of the database and the user. 1 2 3 4 CREATE DATABASE wordpress; CREATE USER &#8216;wpuser&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;password&#8217;;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-5572","post","type-post","status-publish","format-standard","hentry","category-startups"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts\/5572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/comments?post=5572"}],"version-history":[{"count":0,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/posts\/5572\/revisions"}],"wp:attachment":[{"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/media?parent=5572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/categories?post=5572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shakti.tattva.se\/index.php\/wp-json\/wp\/v2\/tags?post=5572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}