Wp Install Another
Another method for installing WordPress
- Get the WordPress files
cd /var/www/websites
sudo -u www-data mkdir -p ./public_html/logs
sudo -u www-data touch ./public_html/logs/error.log ./public_html/logs/access.log
cd public_html
sudo -u www-data wp core download
- INSERT CUSTOM WP CONTENT STEP
- remove original wp-content
- download
wp-base
git repo from taui source, use submodules for 3rd party themes/plugins
- consider hosting stable mirrors of these 3rd party things and upgrading manually
- this would be quite possible by simply hosting my own submodules and leaving the 3rd party sources as non upstream
- Generate the database, user, and password for this WordPress instance
- Login to MySQL as the root user:
$ sudo mysql -u root
- No password required on MySQL 5.7 (or enter password at prompt on 5.5)
- note that you must use root system privs to login to root mysql on 5.7
create database {Database Name};
create user '{User}'@'localhost' IDENTIFIED BY '{Password}'
- Does the next step create the user automatically if you don't do this?
GRANT ALL PRIVILEGES ON {db}.* To '{user}'@'localhost' IDENTIFIED BY '{passwd}';
- view your changes:
mysql> select user, host, password from mysql.user;
mysql> FLUSH PRIVILEGES;
then mysql> quit;
- Set the
wp-config.php
salts and database info according to the MySQL information.
- Use wp-cli for first time install
- it is usually aliased to
wp
- `sudo -u www-data wp core install --url=www.example.com --title=Example --admin_user=ex-admin --admin_password=123xyz --admin_email=admin@ex.com
- if installed in a subdirectory
www.example.com/subdir
then wp option update siteurl http://www.example.com/subdir
Future
- HOW DOES THIS WORK?
wp db create
- create a new database using the wp-config.php
- not needed with my manual steps, but would i benefit from it?
- How about sane default settings from wp-cli?
- correct url rewrite rule
- traceback pingback settings in 'reading' or whatever
- remove tagline!!
- Enumerate even more sane defaults
- Create step 2. This will need to:
- install the custom
wp-base
- enable theme and plugins for
wp-base