New Mint Install? Want WordPress at Home? Full Steps I Take… 


I PERSONALLY DO ALL THIS POST steps, more or less in order, for a new Mint install, BEFORE MINT UPDATES or Backing up other files to this new install, so I can continue working during install while the first step sudo apt installs in blue are downloading first (lots!), to have all the functions I require.

All the steps below also enable a full install of your WPress DB at home if you do a full backup from your site that contains the content directories and the database. If you don't want to get involved in the DB side, you "could" always install WP from scratch in Mint, then import your Exported backup xml files (Posts, Pages etc.) using WPs import function and rebuild the site with a different theme for example…more time consuming.

sudo apt-get install ssh nmap vim automake autoconf module-assistant x11vnc nbtscan locate libnss-winbind winbind g++ libcurl3 gparted testdisk hardinfo k3b intel-microcode amd64-microcode sensors-applet totem vlc chromium-browser mysql-server wordpress apache2 libapache2-mod-php php-mbstring vsftpd php-curl php php-mysql

sudo passwd root

sudo smbpasswd -a stevee

vi /etc/samba/smb.conf
path = /media/
writeable = 1
browseable = 1

sudo mkdir /Share
sudo chown stevee.stevee /Share -R

WIFI stuff: modprobe -r iwl3945 iwl4965
modprobe iwl3945 ; modprobe iwl4965

sudo vi /etc/default/grub

GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian

sudo update-grub2

sudo vi /etc/nsswitch.conf
hosts: files wins mdns4_minimal [NOTFOUND=return] dns

sudo vi /etc/apache2/sites-enabled/000-default.conf

DocumentRoot /var/www
Alias "/DebianAdmin" "/var/www/DebianAdmin"

sudo vi /etc/apache2/apache2.conf

ServerName quad
<Directory /var/www>
Options FollowSymLinks
AllowOverride All
Require all granted

sudo service apache2 restart

Assume all wp files are unpacked into /var/www/ (or in a Backup):

Set all dirs/files to replace correct perms from 777 or other wrong install perms:

sudo cp -vr Backup/www    /var/
sudo chown stevee.www-data -R /var/www

sudo find /var/www/ -type d -exec chmod 755 -R {} \;

sudo find /var/www/ -type f -exec chmod 644 {} \;

/var/www/Search-Replace-DB-master $ ./srdb.cli.php -h localhost -n DebianAdmin -u root -p pass -s -r quad

or before DB import – g is global for every occurrence on every line:

sed -i 's/oldURL/newURL/g' quadDA.sql 

Import DB
cp -v Backup/www/*sql /var/www/
ls -l /var/www
mysql -u root -p
show databases ;
create database wp ;
create database DebianAdmin ;
use DebianAdmin ;
source /var/www/quadDA.sql ;
use wp ;
source /var/www/quadwp.sql ;

sudo service mysql restart

Export DB
sudo mysqldump -u root -p DebianAdmin > /var/www/quadDA.sql

sudo apt install vsftpd

sudo vi /etc/vsftpd.conf

# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd with two configuration files.
# Make sure, that one of the listen options is commented !!

# Uncomment this to allow local users to log in.

# Uncomment this to indicate that vsftpd use a utf8 filesystem.

sudo service vsftpd restart

for; Call to undefined function mb_regex_encoding()

sudo apt install php-mbstring

stevee@quad ~ $ nmap

Starting Nmap 7.01 ( ) at 2018-01-31 01:47 GMT
Nmap scan report for
Host is up (0.00015s latency).
Not shown: 995 closed ports
21/tcp open ftp

Config your router for ports 21 NAT to your PC IP addr/name so WP can get in/out for plugins, updates etc.:

Index No. 8
Service Name
Public Port 21
Private IP 192.168.1.x?
Private Port xxx

For Optimus:

sudo apt install php-curl

sudo service apache2 restart

Is php installed??

stevee@QuadMint ~ $ which php

sudo apt install php php-mysql

Importing Posts over WP limit – again, search for these lines in vim/nano pressing ":" then paste the line to search for…press N for next for duplicate strings. e.g.

:post_max_size (Rtn)

sudo vi /etc/php/7.0/apache2/php.ini

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
post_max_size = 0

; Maximum allowed size for uploaded files.
upload_max_filesize = 20M

sudo service apache2 restart

stevee@quad ~ $ sudo vi /var/www/DebianAdmin/.htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /DebianAdmin/
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /DebianAdmin/index.php [L]

# END WordPress

for Permalink postname failure:

sudo a2enmod rewrite

sudo service apache2 restart