Introduction
This page describes how Alexis Huxley installed and configured WordPress.
Procedure
- Run:
apt-get install wordpress mysql-server libssh2-php
- Apache2:
Alias /wordpress/wp-content /var/lib/wordpress/wp-content Alias /wordpress /usr/share/wordpress <Directory /usr/share/wordpress> Options FollowSymLinks AllowOverride Limit Options FileInfo DirectoryIndex index.php Order allow,deny Allow from all </Directory> <Directory /var/lib/wordpress/wp-content> Options FollowSymLinks Order allow,deny Allow from all </Directory>
- Mysql:
vermicelli# mysql mysql> create database wordpress; Query OK, 1 row affected (0.00 sec) mysql> grant all privileges on wordpress.* to "wordpress"@"localhost" \ identified by "SUPERSECRETPASSWORD"; Query OK, 0 rows affected (0.01 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> <CTRL-D> vermicelli#
- Test:
vermicelli# w3m -dump http://localhost/blog/ Neither /etc/wordpress/config-localhost.php nor /etc/wordpress/ config-localhost.php could be found. Ensure one of them exists, is readable by the webserver and contains the right password/username. vermicelli#
- Proxy:
ProxyPass /wordpress/ http://192.168.1.11/wordpress/ ProxyPassReverse /wordpress/ http://192.168.1.11/wordpress/
- WP config:
vermicelli# cat /etc/wordpress/config-no-ip.org.php <?php define('DB_NAME', 'wordpress'); define('DB_USER', 'wordpress'); define('DB_PASSWORD', 'SUPERSECRETPASSWORD'); define('DB_HOST', 'localhost'); define('SECRET_KEY', 'PNDEmese10MsJEv9BYA2umcp8QRiylcQy9uRo0DnlF'); define('WP_CONTENT_DIR', '/var/lib/wordpress/wp-content'); ?> vermicelli#
- Allow theme installation:
chown -R www-data:www-data /var/lib/wordpress/wp-content
- To make permalinks (nicely named links) work:
chown www-data:www-data /usr/share/wordpress/.htaccess a2enmod rewrite service apache2 restart
- Go to https://www.pasta.freemyip.com/ it should look like this:
- Theme tuning:
vi /var/lib/wordpress/wp-content/themes/reddle/footer.php
- To get rid of horizontal scrollbars in preformatted blocks, which are inserted by Reddle, go to Dashboard –> Appearance –> Editor and locate the CSS code:
overflow-x: scroll;
and change this to:
overflow-x: auto;
- Install the following plugins:
- Akismet
- Cleaner Gallery
- Easy Content Templates
- Easy FancyBox
- Jetpack Lite
- Manage Upload Types
- MapPress Easy Google Maps
- Media File Manager
- Quick Cache
- Simplified Google Maps Light
- TablePress
- WordPress Importer
- WP SlimStat
- YouTube
- The Quick Cache plugin is enabled by running the following command:
perl -pi -e "s/(<\?php)/\$1 define('WP_CACHE', true);/" /usr/share/wordpress/wp-config.php
- The ‘MapPress Easy Google Maps’ plugin puts, what appears to be, a gray top border around maps. More likely, this is a border around an item that I do not display. To get rid of this, edit /var/lib/wordpress/wp-content/plugins/mappress-google-maps-for-wordpress/css/mappress.css and change this:
/* Links for the map */ .mapp-map-links { background-color: #F0F0F0; border-top: 1px solid lightgray; border-bottom: 1px solid lightgray; }
to this:
/* Links for the map */ .mapp-map-links { background-color: #F0F0F0; /* * Next lines commented out by Alexis, to remove top gray * border from above maps. Note that *both* the border-top * and border-bottom need to be removed; presumably, it is * not the *map* that has a border, but rather some other * item that is empty. */ /* border-top: 1px solid lightgray border-bottom: 1px solid lightgray; */ }
- Enable RPAF (so that the stats modules use the real clients’ IP addresses and not the proxy’s) as follows:
- Run:
apt-get install libapache2-mod-rpaf
- Add the following to the apache configuration:
RPAFenable On RPAFsethostname On RPAFproxy_ips <ip-of-first-proxy> ...
- Run:
service apache2 restart
- Run:
- When uploading GPX files to my Cycling pages, I hit the maximum upload limit for a file, which was 2MB; this is not a WordPress issue, but rather issue with the underlying PHP. To fix it run:
find /etc/php* -type f -exec grep -ril upload_max_filesize {} \; | xargs sed -i 's/\(upload_max_filesize\) = .*/\1 = 20M/' find /etc/php* -type f -exec grep -ril post_max_size {} \; | xargs sed -i 's/\(post_max_size\) = .*/\1 = 19M/' service apache2 restart
(Note how the thresholds are raised to different values; this will make it easier to determine which threshold is reached, if any.)