Posts Categorized: Wordpress

Moving a WordPress database to another domain

Posted by & filed under Wordpress.

Here are the SQL queries to update a WordPress database from one domain to another: # define var for old site SET @old_path = ‘http://oldsite.com’ COLLATE utf8mb4_unicode_ci; # set var for new site SET @new_path = ‘http://newsite.com’ COLLATE utf8mb4_unicode_ci; UPDATE wp_options SET option_value = replace( option_value, @old_path, @new_path ) WHERE option_name = ‘home’ OR option_name… Read more »

Parsing WordPress wp-config.php file

Posted by & filed under OOP, Wordpress.

I need a script to extract the database details from the wp-config.php file so I could keep the logon details in one location when I was coding something outside the WP framework. I came up with a class that does this, connects to mysql and selects the database. There are three connection options: PDO, mySQLi… Read more »

WordPress XML-RPC publishing

Posted by & filed under Wordpress.

Well I thought I would try XML-RPC publishing in a WordPress blog. The main advantage I see in using RPC vs. email publishing is the use of font–styles. It also works with my SyntaxHighlighter plugin… I’m using the ScribeFire plugin for Firefox to write this blog, but Microsoft Live Writer looks like a good desktop… Read more »

WordPress permissions or ownership

Posted by & filed under Linux, Wordpress.

I was recently trying to upload a plugin to WordPress and found that the plugin could not create a directory. The problem was not directory permissions – it was user/group ownership. PHP running as fastCGI is running as user nobody on my VPS. I tried changing directory perms to 777 for wp-content/uploads and wp-content/plugins but… Read more »