WordPress’ COOKIE_DOMAIN and Multisite with Domain Mapping

I have been managing a site with multisite and domain mapping, without the traditional plugin. Domain mapping is when you allow a multsite website like mysite.example.com to be used as the website for a different domain, like mysite.com.

The biggest problem I had was getting the admin login working on a mapped domain. This good tutoral explains how to fix that problem. Continue reading WordPress’ COOKIE_DOMAIN and Multisite with Domain Mapping

Some Notes on Site Migration to WordPress

I have a tiny site, sign-in-sheet.com, that was an experiment to see if ads can pay; they can, but it’s a tiny site, with tiny revenues.

I ported it over to WordPress, and it took several hours. It took 9 and 1/3 hours, more or less.

The trade off is that it’s now easier to update.  I have a bunch of modified files that should be uploaded.

The site gets little traffic, but I basically spent less than a day making the initial site. It drives ad clicks, because you don’t have these dense, endless lists of options.  You search, land on a page, and see, along with the content, a big ad. Odds are, a vendor is remarketing something to you, so you are more likely to click.

Webmaster Tools Dinged Me

I found some unpublished printable forms, so added them to the site, growing the footprint. Since this site can now grow, with some effort, I decided to install the Yoast plugin to coach my writing.

Yoast produces an XML Sitemap, so I went over to Google Search Console, aka Webmaster Tools to see if the site was being indexed. As expected, it was out of date… but there were some improvements to the tools, one of them being some tools to analyze how the site will perform in a mobile phone.

There, I had some bad news. Google wants sites to be mobile-friendly. My theme was not.
At least not Google’s version. My CSS and HTML were responsive, and acceptable to my eyes… but Google couldn’t tell.

The lesson here is that you need to get into the search tools asap – meaning as you release the theme. It’ll add a few hours of work to the theme, though.

Converting HTML Layouts into a WordPress Theme

A few companies sell this service, and I looked into it. While conversion and existing layout to a WordPress theme isn’t too hard to create a rudimentary theme that replicates an existing website. Is this a valuable service? Is it going to help the site? Answers withing. Continue reading Converting HTML Layouts into a WordPress Theme

Adding a WP-CLI Command to Your Plugin, Part 1

I wanted to write some importers for CSV files, but not one that operated from the admin screens. I wanted a command that I could pipe my data into, and populate a table.

“Simple,” I thought, and then realized I needed to parse wp-config.php for the database password. While that’s not hard, it’s really bad form, especially when you can use WP-CLI to run commands within the WordPress environment.
Continue reading Adding a WP-CLI Command to Your Plugin, Part 1

PHP Notice: Undefined index: HTTP_HOST in /home/…/ms-settings.php on line 48

You’re running the WP-CLI and get that message, plus the following error:

Error: One or more database tables are unavailable. The database may need to be repaired.

Continue reading PHP Notice: Undefined index: HTTP_HOST in /home/…/ms-settings.php on line 48