[ wordpress ] theme not showing up

หาตั้งนาน โง่เบยแจ้

จริงๆ ง่ายนิดเดียว  enable ที่ระดับ Network Admin น้ะจ้ะ

 

ปล อย่าลืม ชะมด เป็น 755 ด้วย ณ จ๊ะ

Advertisements

[ apache2 ] how to install mod_rewrite in ubuntu

1. 

/etc/apache2$ sudo a2enmod rewrite

will be in 

/etc/apache2/mods-enabled/rewrite.load

2. change ‘AllowOverride None’ to ‘AllowOverride All’

in /etc/apache2/sites-available/default

For example, 

<VirtualHost *:80>
  ServerAdmin webmaster@localhost

  DocumentRoot /var/www
  <Directory />
    Options FollowSymLinks
    AllowOverride None
  </Directory>
  <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
  </Directory>
...

[ wordpress ] “Error establishing database connection” after migration

When we migrate the wordpress from one host to the others, one common error we got is “Error establishing database connection”.

The solution is

  • update ‘wp_options’ table by setting ‘siteurl’ row to the new URL. i.e.  ‘http://localhost/blog&#8217;.
  • update ‘wp_blogs’ table set the ‘domain’ column to the new URL. i.e. ‘localhost’

That’s it.

PS.

– The Preview theme does not show up :

The ‘wp_options’ table may have to be updated by setting ‘home’ row to the new URL, i.e.  ‘http://localhost/blog&#8217;. In order for the ‘get_option(‘home’)’ in ‘wp-includes/functions.php’ to get the right value.

– The rest of the path is at

  • wp-config.php
define('DOMAIN_CURRENT_SITE', 'localhost');
define('PATH_CURRENT_SITE', '/blog');
  • ‘wp_site’ table, ‘wp_sitemeta’ table
  • home row in ‘wp_options’ shows the home URL of all the link in the web