Wordpress: Difference between revisions

From Bitpost wiki
(Created page with "=== Upgrade === I always update Wordpress when an update is available, straight in the admin panel with no backup. It's never failed (errr...). === TODO === * debug JetPa...")
 
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== Upgrade ===
=== Upgrade ===


I always update Wordpress when an update is available, straight in the admin panel with no backup.  It's never failed (errr...).
==== Auto ====


Always autoupdate Wordpress straight in the admin panel. 


=== TODO ===
'''CACHING WILL KILL YOU THOUGH,''' remember to restart apache AFTER pressing the auto-update button:


* debug JetPack installation failure
* Hit autoupdate button, it will upgrade your database; but it will fail to SHOW it as upgraded due to caching.
* debug upgrade to 4.9.4 failure
* Restart apache:
sudo /etc/init.d/apache2 restart
* refresh the page, and hit "upgrade the database" AGAIN to wake wordpress up to the fact that it's already done.
 
==== Manual ====
 
Usually caching is to blame when something goes wrong (see above).  But if you need to dig deeper, you can try a manual update (ie, 'clobber'):
 
  # FIRST DISABLE ALL PLUGINS yes this will FUCK YOU UP OTHERWISE
  # worst-case, if things are fubar, rename this folder: wp-content/plugins
  🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] wget https://wordpress.org/latest.zip
  🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] rm -rf wp-includes wp-admin
  🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] unzip latest.zip
  🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] sudo chown -R apache:apache .
  🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] sudo /etc/init.d/apache restart # RESTART APACHE or shit will be cached
one-liner:
cd ~/development/bitpost.com/htdocs/news && wget https://wordpress.org/latest.zip && rm -rf wp-includes wp-admin && unzip latest.zip && sudo chown -R apache:apache . && sudo /etc/init.d/apache restart
 
=== My themes ===
 
==== bitpost.com/news ====
 
Here i use a very jacked theme:
~/development/bitpost.com/htdocs/news/wp-content/themes/mdm_veryplaintxt
 
Custom widgets, fonts, etc:
~/development/bitpost.com/htdocs/news/wp-content/themes/mdm_veryplaintxt/functions.php
 
CSS:
~/development/bitpost.com/htdocs/news/wp-content/themes/mdm_veryplaintxt/style.css
 
To play with fonts:
* go to google fonts and find some cool ones
* adjust functions.php to load the new ones
* adjust style.css to use them; you should consider font family, size, and weight of at least these 4 things:
body
#content h2
pre
#sidebar ul
* restart apache!

Latest revision as of 23:32, 28 September 2019

Upgrade

Auto

Always autoupdate Wordpress straight in the admin panel.

CACHING WILL KILL YOU THOUGH, remember to restart apache AFTER pressing the auto-update button:

  • Hit autoupdate button, it will upgrade your database; but it will fail to SHOW it as upgraded due to caching.
  • Restart apache:
sudo /etc/init.d/apache2 restart
  • refresh the page, and hit "upgrade the database" AGAIN to wake wordpress up to the fact that it's already done.

Manual

Usually caching is to blame when something goes wrong (see above). But if you need to dig deeper, you can try a manual update (ie, 'clobber'):

 # FIRST DISABLE ALL PLUGINS yes this will FUCK YOU UP OTHERWISE
 # worst-case, if things are fubar, rename this folder: wp-content/plugins

 🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] wget https://wordpress.org/latest.zip
 🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] rm -rf wp-includes wp-admin
 🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] unzip latest.zip
 🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] sudo chown -R apache:apache .
 🌵 m@bitpost  [~/development/bitpost.com/htdocs/news] sudo /etc/init.d/apache restart # RESTART APACHE or shit will be cached

one-liner:
cd ~/development/bitpost.com/htdocs/news && wget https://wordpress.org/latest.zip && rm -rf wp-includes wp-admin && unzip latest.zip && sudo chown -R apache:apache . && sudo /etc/init.d/apache restart

My themes

bitpost.com/news

Here i use a very jacked theme:

~/development/bitpost.com/htdocs/news/wp-content/themes/mdm_veryplaintxt

Custom widgets, fonts, etc:

~/development/bitpost.com/htdocs/news/wp-content/themes/mdm_veryplaintxt/functions.php

CSS:

~/development/bitpost.com/htdocs/news/wp-content/themes/mdm_veryplaintxt/style.css

To play with fonts:

  • go to google fonts and find some cool ones
  • adjust functions.php to load the new ones
  • adjust style.css to use them; you should consider font family, size, and weight of at least these 4 things:
body
#content h2
pre
#sidebar ul
  • restart apache!