Posts Tagged ‘paperless’

Moving WP installation

January 8, 2014

If I move my WP installation I can hard code the IP address using define in wp-config.php (codex here) but since I have 4 sites using subfolders I wanted to change one line instead of going to 4 files and change 8 lines. This solution is to use a file say ip.text at htdocs then insert below snippet in all 4 wp-config.php files to read the line containing the IP address in the text file.

$file = fopen(str_replace(substr(ABSPATH,-2),"",ABSPATH)."ip.txt", "r");
$ip = fgets($file);
define('WP_HOME','http://'.$ip."/a/");
define('WP_SITEURL','http://'.$ip."/a/");

In this example /a/ is the subfolder containing a WP installation.

There are more issues than I ever anticipated. In fact WP uses absolute url for all attachments and media that went into the posts therefore if the sites are running under a different IP all links are broken.   I have tried a few plugins which claim to resolve this, none of them can do all I want to do.

To completely replace IP addresses appear in all your posts I have to do it in mysql, fire up phpmyadmin then run below

UPDATE wp_posts SET post_content = REPLACE(post_content, 'xxx.xxx.xxx.old','xxx.xxx.xxx.new')

So that’s all I have to do to move my WP Intranet running under XAMPP portable Lite to an external drive, either thumb or HDD/SSD, run setup_xampp.bat in the XAMPP root folder do the little tricks above then I could run the installation in any Windows OS.

Advertisements

Doing it differently

December 25, 2013

I have said this many times. Most people resist change so we keep on doing things the same way. For certain things, if I could, I like to do it differently every time.

I can’t escape hiccups failure so I tried to enjoy them.

About 10~12 years ago I set up at work a browser based search facility to help myself with mountain and ocean of papers. I published my experience on an ASP Programming site.   What I’ve learned is obsolete, I hardly remember anything, never mind that I enjoyed the learning process.

Then few years back I did that again that time I used XAMPP server stack and WordPress, a popular CMS, as the platform. Everything went as planned and I learned from that experience backing up the database and scheduled backup by running DOS batch files using XP’s scheduled task.   XP support ends in a few month so again I used obsolete technologies.

Recently I’m in the mood of doing this again, the 3rd time.  To do this differently I’m working on XAMPP portable lite on an external SSD drive. However my work location uses DHCP so in case my 6~7 years old DIY computer failed on me I could still run the stack on another computer running Windows OS.   I did struggle a bit if I should be running Linux or XP for this little project, at the end I chose the easier option as I want this launched ASAP.

I’ve worked out a few safety measures such that I could migrate my work easily, backup the whole thing, making it easy to restore things etc.   I’ll post codes separately later as I’m sure these will be useful to me in the future.

Paperless solution demonstration

November 8, 2006

I went to see a demo recently. I was surprised to have met someone I knew from Asta System. If fact there is a story behind my encounter with that gentlemen. I published an article in ASP101 some years ago about paperless solution. That gentlement read that article and emailed me so I said ‘hey we are in the same little city, let’s meet’. Then we came out for a chat and his company sells paperless solution.

To be honest the demo I saw the other day isn’t too impressive. I just said to myself ‘I could write that too, just give me couple of years….’. Of course I couldn’t possibly be capable of producing a commercial product like that, still it wasn’t that attractive at first glance. I think it’s about 3-4 years behind.

There is another firm here in Hong Kong called Axisoft who is providing paperless solution to a few government departments here. I wish I could have a look one day.

Paperless office

July 14, 2006

Got this comment about my quest for paperless office.

Have briefly looked at this iKE office which is like another one I know called springCM. Web 2.0 is about “software as service” as both of them are not new in this market they are doing exactly the right thing for a long time. Many other similar products requiring users to buy software in a box for installation on client’s server are completely out of date.

I just wonder if there are ads supported opensourced solution available. What exactly is that? Well say you have designed a paperless solution, e.g. using LAMP which are all free, then distribute it freely to whoever wants it. How do you get rewarded? To do that you could add in the user interface with text ads similar to what Gmail does to your email, i.e. peeks into indexed text of the stored document and offer text ads. Of course that intranet based paperless solution stops working if an Internet connection is broken, i.e. relevant text ads is always available to the user interface.

Has anyone out there thought of that? Hey Google will you consider that? Paperless solution is something good to go with GDrive.