Installing WordPress on Fedora 25 and 26 Minimal install
-
Start with @JaredBusch guide to install Fedora 25 minimal.
The following are based upon @JaredBusch CentOS install.
Assuming you're using a VM somewhere other than local on your machine, you'll want to use putty or Bitvise or some other SSH client so you can copy paste into the session.
note: those used to using php-mysql there is a change. php-mysql was deprecated, now you use php-pdo_mysql
dnf -y install httpd mariadb mariadb-server php php-pdo_mysql php-xml php-gd wget nano policycoreutils-python; systemctl enable httpd.service; systemctl enable mariadb.service; setenforce permissive; systemctl start mariadb; firewall-cmd --zone=public --add-port=http/tcp --permanent; systemctl reload firewalld; systemctl start httpd;
Download and unpack WordPress
cd /var/www/html; wget https://wordpress.org/latest.tar.gz; tar -xzvf latest.tar.gz;
Change the settings below to things specific to your install.
NOTE: because of exit characters in certain shells, and the fact that these passwords can only be used on the local machine, it's advisable to only use alphanumeric characters for the passwords below - it will make your life easier#Create a database for wordpress and a user to access it. mysql -e "CREATE DATABASE wp_yourdomain_db;" mysql -e "CREATE USER 'wp_user_yourdomain'@'localhost' IDENTIFIED BY 'somerandompassword';" mysql -e "GRANT ALL PRIVILEGES ON wp_yourdomain.* TO 'wp_yourdomain'@'localhost';" mysql -e "FLUSH PRIVILEGES;" #Secure mariadb. These commands do what mysql_secure_installation does interactively mysql -e "UPDATE mysql.user SET Password=PASSWORD('somesecurepassword') WHERE User='root';" mysql -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" mysql -e "DELETE FROM mysql.user WHERE User='';" mysql -e "DROP DATABASE test;" mysql -e "FLUSH PRIVILEGES;"
Make a copy of the wordpress directory into the folder for this instance of WordPress
note - yourdomain is replaced by whatever you want to reference this instance ascp -R /var/www/html/wordpress/ /var/www/html/yourdomain/ chown -R apache:apache /var/www/html/yourdomain/;
Create a wp-config.php from the sample file, then update it with your specific settings. You are changing
wp_yourdomain_db
,wp_user_yourdomain
, andsomerandompassword
to match the ones you create above.cp /var/www/html/yourdomain/wp-config-sample.php /var/www/html/yourdomain/wp-config.php; sed -i -e 's/database_name_here/wp_yourdomain_db/' /var/www/html/yourdomain/wp-config.php; sed -i -e 's/username_here/wp_user_yourdomain/' /var/www/html/yourdomain/wp-config.php; sed -i -e 's/password_here/somerandompassword/' /var/www/html/yourdomain/wp-config.php;
Go to https://api.wordpress.org/secret-key/1.1/salt/ and copy paste a unique salt into your wp-config.php file
No idea how to use sed to find/replace this. This data goes at the end of the wp-config.php file.
This is what is in the default file.define('AUTH_KEY', 'put your unique phrase here'); define('SECURE_AUTH_KEY', 'put your unique phrase here'); define('LOGGED_IN_KEY', 'put your unique phrase here'); define('NONCE_KEY', 'put your unique phrase here'); define('AUTH_SALT', 'put your unique phrase here'); define('SECURE_AUTH_SALT', 'put your unique phrase here'); define('LOGGED_IN_SALT', 'put your unique phrase here'); define('NONCE_SALT', 'put your unique phrase here');
- If you are only going to run the one website on this server, you can edit the apache config
- to change the default document root to point to your wordpress folder
- list itemby default it is located: /etc/httpd/conf/httpd.conf
- Change the following two lines
DocumentRoot "/var/www/html/yourdomain" # was "/var/www/html" <Directory "/var/www/html/yourdomain"> # was "/var/www/html"
restart the webserver then browse to your site.
systemctl reload httpd;
-
This post is a work in progress.
In fact I have to go back to my recovery point again and try this list over again. -
Why Fedora 25 instead of 26?
-
@black3dynamite said in Installing WordPress on Fedora 25 Minimal install:
Why Fedora 25 instead of 26?
No reason other than previous instructions.. I'll try 26 this afternoon.
downloading the netinstall of 26 now. -
@black3dynamite said in Installing WordPress on Fedora 25 Minimal install:
Why Fedora 25 instead of 26?
Man, you just can't please anyone, can ya
-
@dashrender said in Installing WordPress on Fedora 25 Minimal install:
@black3dynamite said in Installing WordPress on Fedora 25 Minimal install:
Why Fedora 25 instead of 26?
No reason other than previous instructions.. I'll try 26 this afternoon.
downloading the netinstall of 26 now.Never install old.
-
@scottalanmiller said in Installing WordPress on Fedora 25 Minimal install:
@dashrender said in Installing WordPress on Fedora 25 Minimal install:
@black3dynamite said in Installing WordPress on Fedora 25 Minimal install:
Why Fedora 25 instead of 26?
No reason other than previous instructions.. I'll try 26 this afternoon.
downloading the netinstall of 26 now.Never install old.
Yeah Yeah - the page I ran into yesterday say Fedora 26 was in beta.. clearly I found an old page.
26 is currently install in a new VM.
-
@dashrender said in Installing WordPress on Fedora 25 Minimal install:
@scottalanmiller said in Installing WordPress on Fedora 25 Minimal install:
@dashrender said in Installing WordPress on Fedora 25 Minimal install:
@black3dynamite said in Installing WordPress on Fedora 25 Minimal install:
Why Fedora 25 instead of 26?
No reason other than previous instructions.. I'll try 26 this afternoon.
downloading the netinstall of 26 now.Never install old.
Yeah Yeah - the page I ran into yesterday say Fedora 26 was in beta.. clearly I found an old page.
26 is currently install in a new VM.
27 is almost out of beta now.
-
Yeah, may as well test it on 27 too so you can add something like:
"Tested and working on Fedora 25 - 27".
I don't see why it wouldn't... its' just web stuff which is pretty much universal, and some firewall crap.
Great post though! Helpful
-
@tim_g said in Installing WordPress on Fedora 25 Minimal install:
Yeah, may as well test it on 27 too so you can add something like:
"Tested and working on Fedora 25 - 27".
I don't see why it wouldn't... its' just web stuff which is pretty much universal, and some firewall crap.
Great post though! Helpful
Yeah several tweaks vs the CentOS install @JaredBusch did last spring.
-
@dashrender said in Installing WordPress on Fedora 25 Minimal install:
No idea how to use sed to find/replace this
Here's a quick one liner:
for i in {SECURE_AUTH_KEY,LOGGED_IN_KEY,NONCE_KEY,SECURE_AUTH_SALT,LOGGED_IN_SALT,NONCE_SALT,AUTH_KEY,AUTH_SALT}; do sed -i "s/$i/yourkeyhere/g" wp-config.php; done
Ah never mind. I didn't realize each line was different.
-
OK after a few hours of trouble shooting I finally have
-
My issue was that I used a random password generator to create passwords, and those passwords included characters that BASH interpreted as exit characters. i.e. !
Removing those characters solved my issues.
Now both Scott and JB have asked me why I had special characters in my passwords - to which I replied why not?
Scott only mentioned that for his passwords he sticks to alphanumeric.
Jared did express that since these passwords were only usable locally on the computer, very complex passwords aren't needed.
OK fine, they aren't needed but so what? They still should be usable, and of course they are, as long as you pass them through the shell in a manner that the shell knows they are characters and not commands.Of course, for those that know JB, the conversation wasn't nearly that polite
-
@dashrender LOL
-
@jmoore said in Installing WordPress on Fedora 25 Minimal install:
@dashrender LOL
Thanks, as if my pain wasn't enough
-
@dashrender said in Installing WordPress on Fedora 25 Minimal install:
Of course, for those that know JB, the conversation wasn't nearly that polite
Lol, I can only imagine!
-
For ease and speed and better management, I highly recommend using WP-CLI for all of your downloading, updating, configuration, etc. One like of WP-CLI will eliminate most of this installation, while making it easier to maintain in the long run.
https://mangolassi.it/topic/13062/install-a-basic-wordpress-site-with-wp-cli
-
@scottalanmiller said in Installing WordPress on Fedora 25 and 26 Minimal install:
For ease and speed and better management, I highly recommend using WP-CLI for all of your downloading, updating, configuration, etc. One like of WP-CLI will eliminate most of this installation, while making it easier to maintain in the long run.
https://mangolassi.it/topic/13062/install-a-basic-wordpress-site-with-wp-cli
Yup, that's what I use now, I won't every go back!
https://mangolassi.it/topic/16084/installing-fedora-27-lamp-stack-plus-wordpress