↓
 

A Pipe and a Keyboard

A sort of Linux scrapbook

  • Home
  • About
  • Software
  • List of posts

Author Archives: Richard

Post navigation

<< 1 2 … 9 10 11 12 13 14 15 … 42 43 >>

A new home for an old site

A Pipe and a Keyboard Posted on November 7, 2012 by RichardNovember 7, 2012

There are two ways of moving a WordPress site from one server to another.

One is to create a database, and then copy all files to the new server, point wp-config at the new database and copy the contents of the database across.  This is the simplest way and ideal if, for example you are switching hosts.

The other method is trickier, but a lot more efficient, creating a leaner and faster site.  I have just completed a transfer of Head Rambles using this method.

The first thing is to create a new blank database on the new server, using a spare domain name for access.  Then upload a fresh copy of WordPress and using its built in features, create a new WordPress site.  The new site should be set up with the same Title and Subtitle as the old site, but using the new domain.

Next, copy across the theme files from the old server.  In my case I did a fresh install of Weaver II and then copied over the little backup files.  Any specific image files [such as the Banner and any images in the sidebar] should be copied across also.

At this point the new site should look identical to the old, but contain no posts or pages.

In my case, I then backed up the old database but did it one table at a time.  I then imported into the new database the following tables – Posts, Postmeta, Comments, Commentmeta, Terms, Term_relationships, Term_taxonomy and Links.  If the new database has been set up with a different prefix from the old [for example, if the old was WP_ and the new one is NEW_] then before uploading the files to the database, open them in a text editor and do a simple search and replace.

Don’t forget to copy over a copy of wp-content/uploads.

Now is the time to transfer plugins.  The ideal is to upload fresh copies of each plugin to the new site.  This is the time to decide which plugins are really necessary and which ones can be dumped.  Be ruthless!

At this point the site should be running smoothly and be identical in all respects to the old, apart from the domain name.  Now is the time to test that all the plugins are functioning correctly and that the site is behaving itself.

The next part is the tricky part.

Shut down the old site for changes [for example, disable comments]. Take another backup of the Comments database tables [and Posts if that has changed].  Upload these to the new database.

Now point the domain to the new server.  While that is propagating, open up the Options table in the new database and change every instance of the temporary domain to the permanent domain.

Once the domain has switched and is pointing at the new server the job is complete.  You should now have a much leaner faster site.

In the case of Head Rambles, the database dropped in size from 54Mb to 32Mb and from 34 to 17 tables.  Average page load time dropped from 1.48 seconds to 0.66 seconds which is quite impressive?  The main losses were database entries from redundant plugins and trimming the Options table from 16,225 records to 276 [a saving of 4.7Mb!].

The only problem I had was in switching the domain, where a couple of DNS servers got locked up for some reason.  It meant the whole domain was dead for a while, but the wait and the trouble was worth it.

To be safe, I have kept the old site running but with a different domain name.  It is blanked out for the general public but I can access it, for example if I need to cross check settings or retrieve any logs.  Once I am happy that it is redundant it, and its bloated database can be scrapped.

Posted in Blogging, Tech stuff | Leave a reply

Working with Weaver II–Part 3

A Pipe and a Keyboard Posted on November 2, 2012 by RichardNovember 2, 2012

One of the big problems with customising themes is that the theme’s core files have to be modified.

So you spend a happy few hours modifying style.css and you get the site looking just as you wish.  Then along comes an update to the theme which nicely overwrites your customised style.css and you are back to where you started. 

Of course you should have a backup of your customised file, but suppose the update included the theme author’s updates to style.css? 

As I have already pointed out, Weaver has the facility to insert your own code (CSS or HTML) into the header or footer of the site without any file editing.

An example of this is in the layout of the nested comments on the theme.  I felt that the reply to a comment wasn’t indented enough, and could lead to some confusion, as it wasn’t immediately obvious whether a comment was a new comment in its own right, or a reply to a previous comment.

Indent1

The obvious way was to modify the style.css file but I went the route of adding an insert of some CSS into the Header in the (Advanced) Admin area –

.commentlist li.comment, #respond  {
margin-left: 15px !important;
}

This had the desired effect.  The effect is small but significant enough to improve readability –

Indent2

Since I made that modification, there has been an update to the Weaver theme.  I applied the update and all my modifications remained intact.

Another hugely significant feature is that in the event of catastrophic failure I only need three things –

  1. A database dump (mailed to me daily via a plug in)
  2. A copy of the images I have created
  3. A tiny XML file which Weaver creates and which contains all the modifications I have applied to the theme, including code inserts.

Every other item I need can be downloaded from the Internet.

Not many themes can do that?!

Posted in Blogging, Tech stuff | 8 Replies

Working with Weaver II–Part 2

A Pipe and a Keyboard Posted on October 23, 2012 by RichardOctober 23, 2012

I mentioned before that I had rejigged my three blogs to use Weaver II.

I am currently in the process of designing another (for a friend of a friend) and am once again using Weaver II.

It has become a real challenge to see just how far I can go without changing any code whatsoever in the core Weaver II files.  So far I am really impressed.

One of the big features is the ability to insert snippets of additional HTML, CSS or Javascript into parts of the site just by entering those snippets in at the Admin area. 

WeaverDash

So far I have been able to add CSS animation, customise a plugin’s display and to layout a complete page using CSS.  The latter was done by entering the various blocks (DIVs) on the page itself and then using custom CSS to handle those blocks.

I did come across a couple of areas though where in the bad old days I would have modified the raw code.  In particular I wanted to be able to place my own code in specific areas on pages.  For example, I wanted to insert some additional text onto the Comment form and also some Javascript (for Google Ads) onto posts.  The way around this was to install another plugin – Code Insert Manager – which does exactly what I want.  I realise there are plugins for Google Ads, but the Insert Manager does this and a lot more besides.

So far, I have managed to do everything without any file editing with one small exception – I use the CKEditor plugin for WYSIWYG comment editing and I wanted to modify the available buttons.  This isn’t possible from the admin area so I finally had to resort to tweaking the plugin’s file.

Weaver II also has its own plugin (Weaver II Theme Extras) which is essential as it contains an excellent backup feature.  All non-default settings and code additions to Weaver II are backed up to a small file which can be stored locally.  In the event of catastrophic failure the entire site can be restored using the standard installation files and then retoring all the various modifications using the backup file.

That’s assuming you have a backup of the database and images, of course!

Posted in Blogging, Tech stuff | Leave a reply

Stat counters for the blogger

A Pipe and a Keyboard Posted on October 15, 2012 by RichardOctober 15, 2012

A lot of people who run websites like to play around with Statistics.

I confess I am no exception but I have always had a problem – which service do I use for gathering statistics?  I decided to run a block of them in parallel on the same site to see how their figures compare.  The figures I quote are all from precisely the same time-block.

AWStats

AWStats

The first off is Awstats.  This is preinstalled on most web servers and is generally accessed via the control panel.  It is the only server-based service on my list.

AWStats is fine for keeping an eye on such things as bandwidth, but beyond that is of little use unless you are running a very basic HTML site.  Its problem is that it counts everything and that would include the myriad of crawlers and spiders out there.

AWStats figures

VisitorsVisitsPage impressionsHits
137263232288396607951

The Hits figure above is completely meaningless as it counts every single file downloaded from the site including all images.  Its only real value is as a bragging point if your audience is not fully aware of the meaning of “hits”!

Google Analytics

Google

Google Analytics is a free service and is widely used.  What I like is its stability, and the fact that it now gives live updates (up until a while ago it only updated on the hour).  Its interface is not very intuitive as it is obviously aimed as much at the business user as the occasional hobbyist.  Once you have climbed the learning curve however, it is an immensely powerful tool.

Google Analytics figures

VisitorsVisitsPage impressions
6144963843047

Statcounter

StatCounter

Statcounter is another free web based service.  Like Google it gives a lot of information through a fairly simple interface.  It is a lot more intuitive than Google’s, at least.

Statcounter figures

VisitorsVisitsPage impressions
83851170215901

Histats

Histats

Histats is another free web based system which I recently discovered.  This has a simple rather attractive interface which provides all the essentials.  One feature of Histats which is quite clever is that it compares the current day’s figures on a live basis and compares them with previous figures to give a reasonably good prediction of the full day’s figures.  It also provides an insight into “live visitors” with such details as their location, what they are currently viewing and for how long.

Histats figures

VisitorsVisitsPage impressions
57701048615227

Woopra

Woopra

I have been using Woopra since they were in Beta testing, a few years ago.  Their service is web based, though I still prefer and use their [sadly obsolete?] desktop application.  Woopra is free for any site up to 30,000 page impressions per month.  After that, you start paying!  They too give a live view of visitors, showing what they are doing on site, to the point where you even see what they have typed into a comment box.  The live view shows their geolocation, number of previous visits and visit history as well as OS, Browser, Platform etc. 

This service provides the facility to send any visitor a live message when they are on-line.  Apart from trying it with a friend or two (who were pre-warned) the only time I ever used this facility was to send messages to a Troll who was annoying the site.  That was extremely effective.  No more Troll!

Woopra figures

VisitorsVisitsPage impressions
?1147917739

One area where Woopra falls down is in their historical figures (hence the lack of “Visitors” figure above.  Maybe this is available in their subscribed version?

HitSniffer

HitSniffer

Recently I was introduced to HitSniffer.  This is another web based service which has a very attractive and simple interface.  Like Woopra, it provides details on live current visitors and their history with all the relevant data – geolocation, Browser, OS etc.  It also names each visitor by their web “moniker” even if they haven’t commented on a blog, however they do that?  Some of their historical figures can be more than a little suspect.  As an example, my Hitsniffer shows zero visits to this site from a Linux platform, when I know this is patently false.

Errors apart, I love this system as the interface is clean, crisp and live.  It comes with a very large range of features including a neat and simple historical graph laid over the current week, so trends are immediately obvious.  It does however come with a drawback – it isn’t free!  Not only that but the basic package (at $5.99 per month) cuts off at a mere 10,000 page impressions per month, whereupon the price ups to $10.99 a month for the next 10,000 pages.  This would price it out of the market for your average blogger, except for the really dedicated or wealthy.

HitSniffer figures

VisitorsVisitsPage impressions
58291068416900

–oOo-

Summary of the figures

SystemVisitorsVisitsImpressions
AWStats137263232288396
Google6144963843047
Statcounter83851170215901
Histats57701048615227
Woopra?1147917739
HitSniffer58291068416900

Of course the big problem with all of the above is which one is showing the correct traffic?

The only answer that satisfies me is “none of them”! 

You can see from the above figures that absolute figures vary wildly from system to system. Ignoring AWStats, is the site getting 15,227 or 43,047 page impressions? Why is there such a huge disparity? Maybe someone can give a definitive answer, but I can’t.

To the average user, absolute figures aren’t important.  Absolutes only come into play when offering a site for advertising.  The important thing is the relative figures.  It is quite important to know if your traffic is climbing or dropping.  It is quite important to know where your traffic is coming from and what countries are visiting. 

Which package shall I continue to use?

My preference would be HitSniffer, but to avail of the package which would suit my needs, I would have to spend more than my entire hosting and domain registration budget.

I’ll probably stick with Google!

Posted in General | Tagged Linux | Leave a reply

Working with Weaver II – Part 1

A Pipe and a Keyboard Posted on October 7, 2012 by RichardJune 8, 2016

I started writing blogs back in 2006.

After a bit of searching at the time I found a template I liked, that was simple and easily adaptable, and have been using that template ever since.  In fact I started a second blog and used the same template (heavily modified) on that too.

Over the years, both the CSS and PHP files in the template were extensively modified, particularly as in the early days (pre-widget) I had hard coded a lot of items straight into the template files.

A couple of weeks ago I decided it was time for a bit of an overhaul.  The first thing I did was to “widgetise” Head Rambles.  That was fairly painless and the result looked almost identical to the original.  However I still had a load of modified template files and the CSS was in a bit of a mess.  I decided on a change of the core theme and template.

My good friend Kirk pointed me in the direction of Weaver II, which is a template he has been using.

My first impression was that it looked a bit daunting.  I set up a local server on my laptop and installed it there.  Sure enough, there was a bit of a learning curve.  The Admin area is quite large with a lot of options.

My first project was to create a theme to match the Rambles one as closely as possible.  The further I went the more impressed I became.  There is virtually no aspect of the design that couldn’t be changed from the Admin area.

Rambles is now running the new Weaver template and the original design.  The main aspect is that I haven’t touched a single PHP or CSS file so updates/upgrades won’t destroy anything.  As a bonus, I have been able to remove several plugins as their functions are built into Weaver. 

The only drawback, if you can call it that is that the theme is three times slower that the old one.  Does that sound bad?  If I say that the old one took 0.07 seconds to load while Weaver takes 0.2 seconds?  Not bad considering all the additional bonuses.  The new site is mobile friendly (previously I had to install a plugin and a clatter of extra themes).  It has a much better comment area, with nested comments.  And I can make any changes to the theme with a couple of clicks of the mouse, with no FTP or file editing at all.

Since then I have also redesigned this site and Smoking so all three sites are now updated.

I have a feeling I will be writing a bit more about Weaver!

Posted in Blogging, Tech stuff | 2 Replies

Post navigation

<< 1 2 … 9 10 11 12 13 14 15 … 42 43 >>

Recent Posts

  • GRUB problems
  • Tab bar broken again in Firefox 133
  • WP phpMyAdmin Session mismatch
  • When Linux slows down
  • Firefox broken again

Categories

  • Blogging
  • General
  • Linux
  • Media
  • Tech stuff
  • Writing

Blogroll

  • Head Rambles
  • Kirk M's Just Thinkin'
  • Wordpress Beginner
  • Wordpress Development

Archives

©2025 - A Pipe and a Keyboard - Weaver Xtreme Theme
↑