Author: paul.hulbert@gmail.com (page 1 of 4)

Backup and Transfer – Part 3

SUMMARY:

  • Created a new site at paul.hulbert.org/swehs3 with sample content, including photo links to external hosting for files (i.e. files not within WordPress subdirectories)
  • Successfully migrated (copied) site to paul.hulbert.org/swehs4 using Duplicator plugin
  • Tried putting photo files in /swehs4 directory, but not within WordPress subdirectories.
  • Amended photo page code (Search and Replace in NotePad++) to call these files
  • Need to check performance (may be faster)
  • Ran Duplicator again to migrate a new /swehs5 directory, to see whether Duplicator copies the photo files to the new install in /swehs5

EVALUATION

  • Yes it DID copy /historicphotos/ to /swehs6/
  • And it DID change the code referring to the photos to point at /swehs6/historicphotos/
  • So this is very convenient for migration because it changes the code
  • But it means that Duplicator might time out if there is too much photo data
  • Need to take a decision about where to store photo data etc, and whether to backup manually or automatically
  • Today’s experiments show that we can do either.

DETAIL:

On my JustHost account:

  • Created a new directory swehs3
  • Created a new MYSQL database paulhul1_swehs3
  • Created a new user paulhul1_swehs3
  • Password F4……
  • All privileges
  • WordPress Tools – New Install
    – Domain www.paulhulbert.org
    – Path /swehs3
    – Site Title SWEHS prototype 3
    – Admin Username paulhulbert
    – Admin Password F4…
    – Admin Email F4…

Went to http://www.paulhulbert.org/swehs3 and signed in
– Installed and activated Hemingway theme
– Added WPEHS logo to Media Library and Header
– Removed Site Title “SWEHS PROTOTYPE 3” and tagline “Just another WordPress site” from Site Identity
– Added various pages – mainly dummy, apart from Museum page and Photos / Bath Test Photos 6

Creating a static home page
– Settings – Reading – Set Home Page to Welcome

THAT’S ENOUGH CONTENT FOR A BACKUP AND TRANSFER TEST

Installed Duplicator plugin, activated
See video at: https://www.youtube.com/watch?v=tdP3quWLM0Q

Backup:

Warning that large files and total size may cause timeouts
Package will be stored in /home4/paulhul1/public_html/swehs3/wp-snapshots
“Package completed” (and yes, it appears in wp-snapshots)
In Duplicator screen, click Installer and Archive buttons to download them.

Transfer:

Created a new directory swehs4 on my JustHost hosting
Copied installer and archives from my downloads.
Created a new MYSQL database paulhul1_swehs4
Created a new user paulhul1_swehs4
Password F4…
Added user to database paulhul1_swehs4
All privileges

Open http://paulhulbert.org/swehs4/ in browser
Click on installer.php
Host paulhulbert.org
Database paulhul1_swehs4
User paulhul1_swehs4
Password F……
Test database
Response:
Host:    Success
Database:    Success
Version:    5.6.32-78.1-log
Compatibility:    This Server: [5.6.32] — Package Server: [5.6.32]

Next, Install Confirmation, yes
URL http://paulhulbert.org/swehs4/ (auto-filled)
Path /home4/paulhul1/public_html/swehs4/ (auto-filled)
Title SWEHS Test 4 (manually filled)
Update permalinks

Login is at http://paulhulbert.org/swehs4/wp-login.php
Couldn’t log in – asked for password reset email, set as my main WordPress account, ID=ph
Logged in OK then
Site looks OK except for “SWEHS TEST 4” block across header image
Removed Site Title “SWEHS TEST 4” from Settings – General – Site Identity

SUCCESS!

NEXT STAGE

  • Copied historicphotos directory to /swehs4, but not in WordPress subdirectories
  • Amended swehs4 photo code to point at /swehs4/historicphotos
  • Created a new directory swehs5 on my JustHost hosting
  • Logged in to swehs4 site with ph and usual WordPress password
  • Deleted reserved files from Duplicator
  • Duplicator – Manage – Create New to build a package
  • Clicked Next – Scan gave a warning about a large (>3MB) file package
  • Checked on Show Path, and it’s the archive file in
    home4/paulhul1/public_html/swehs4/20170515_34ad329988d2b4f98049170515122047_archive.zip
  • That’s actually the root of /swehs4/ – located and deleted the zip file using Filezilla
  • In Duplicator, Back, then Next
  • Scan reported all “Good”
  • Clicked Build
  • “Package completed” (and yes, it appears in wp-snapshots)
  • In Duplicator screen, click Installer and Archive buttons to download them.NEW TRANSFER
  • Copied installer and archives from my downloads to swehs5
  • In JustHost, created a new MYSQL database paulhul1_swehs5
  • Created a new user paulhul1_swehs5
  • Password F4…
  • Added user to database paulhul1_swehs5
  • All privileges
  • Open http://paulhulbert.org/swehs5/ in browser
  • Click on installer.php
  • Host paulhulbert.org
  • Database paulhul1_swehs5
  • User paulhul1_swehs5
  • Password F……
  • Test database
  • Response:
    Host:    Success
    Database:    Success
    Version:    5.6.32-78.1-log
    Compatibility:    This Server: [5.6.32] — Package Server: [5.6.32]
  • Next, Install Confirmation, yes
  • URL http://paulhulbert.org/swehs5/ (auto-filled)
  • Path /home4/paulhul1/public_html/swehs5/ (auto-filled)
  • Title SWEHS Test 5 (manually filled)
  • Next
  • Save permalinks – had to log in with ID = ph, PW = usual WordPress PW
  • “Clicked “Take me to the cleanup page”
  • Delete Reserved Files, Clear Build Cache
  • Manually removed archive zip file from root of /swehs5/
    (Login is at http://paulhulbert.org/swehs4/wp-login.php – but I was already logged in from the previous step)
  • Site looks OK except for “SWEHS TEST 5” block across header image
  • Removed Site Title “SWEHS TEST 5” from Settings – General – Site Identity

EVALUATION

  • Yes it DID copy /historicphotos/ to /swehs6/
  • And it DID change the code referring to the photos to point at /swehs6/historicphotos/
  • So this is very convenient for migration because it changes the code
  • But it means that Duplicator might time out if there is too much photo data
  • Need to take a decision about where to store photo data etc, and whether to backup manually or automatically
  • Today’s experiments show that we can do either.

Experiments with photo page layouts 3

Time for a second prototype!

  • Set up new WordPress installation in paulhulbert.org/wpehs
  • Changed password to full length to match other website
  • Built “wpehs” website page by page to match most of “swehs” version
  • Changed internal file references to external ones (Notepad++ search and replace came in handy here!)
  • Note that Execute permissions on external files still need to be checked out – I’ve possibly opened the permissions up too far. But PDFs may need Execute, even if images don’t. More experimentation needed.

The external online folders are paulhulbert.org/…

  • historicnews
  • historicphotos
  • historicsupplements

Anything I’ve loaded into the Media Library is duplicated in a folder on my PC called “historicresources”

 

Next step will be to try a backup. Note the complication that all my WP sites are in a single database!

Experiments with photo page layouts 2

Decided that the best bet – from a backup point of view – would be to store the data files such as photos, videos and documents externally (rather than in Media), and to keep the WordPress installation light so that it would back up easily.

Successfully trialled external photos, presented using a table layout. Altenate rows are photo, and label (with a white background). You need a blank header row to get the white background on the right rows. This presents well on phone and tablet as well.

It’s essential to have the right file permissions for this to work (755 on the folder, 644 on the files – may need to review the “Execute” permissions)

The experiments at http://www.paulhulbert.org/swehs/bath-test-photos-6/ were with fairly small files, 135 kb (900 x 600 px) to 2 Mb (3304 x 2397 px). An “average” one would be 740 kb (1632 x 1172). Need to consider resizing to a standard size. The photos are presented as 300 px wide, so resizing all to say 1500 px wide would be a good compromise – need to try using bulk resizing in Photoshop Elements, see https://digital-photography-school.com/batch-processing-in-photoshop-elements/

Followed this procedure, selecting 1500 px, Constrain Proportions, and 72 dpi, convert files to jpg Medium Quality. The result was 103 kb to 503 kb, all 1500 px wide. Worked well. Uploaded to replace files, and the page loads quickly. Quite good quality even when clicked on to magnify.

 

Experiments with photo page layouts

I played with a table layout, but one-column looked sparse, and two-column wouldn’t fit on a mobile screen.

However just dropping the photos in worked fine, if the photos were centred.

Then when I added some text – lorem ipsum paragraphs – I found that both text and photos fitted neatly on the mobile, as well as on iPad. And the portrait format on the mobile even formatted neatly when some of the photos were left or right aligned!

(See http://www.paulhulbert.org/swehs/bath-test-photos-3/ )

The vertical photos were resized to custom width 300.

The photos had Captions and Alt Text generated from a spreadsheet, e.g. SWEHS_5.2.021.jpg – Date 1920 – Customer record.

Note that the photos were renamed before being uploaded to avoid the problem of the space in the name – not sure that this was strictly necessary. Try again in the next trail.

Once I have a procedure, need to try a nearly-blank installation of WordPress with say 1000 photos loaded, and then whether I can then run a backup properly.

Header logo changed

Header logo changed to “Western Power Electricity Historical Society”, with explanation in text of Home Page.

Backup and transfer – part 2

Summary

Exporting the WordPress database and importing it into a new folder.

Exporting the WordPress files – takes a VERY long time due to the size of the site!

Haven’t got as far as importing the files into the new folder yet – may try exporting to DropBox first.

Details:

Following the instructions on http://www.wpexplorer.com/migrating-wordpress-website/

Downloaded WordPress files using Filezilla FTP.
wp-content is the VERY big file, taking hours, because of the photos.
It takes more than 3 hours to download 3451 photos (and the rest – see below!)

Exported WordPress database

On justhost.com
Created new database
Created new database user
Created new password

Edited the wp-config.php file to match database, user and password

Attempted to import the database, got an error:

=======================

Error

SQL query:


— Dumping data for table `wp_comments`

INSERT INTO `wp_comments` (`comment_ID`, `comment_post_ID`, `comment_author`, `comment_author_email`, `comment_author_url`, `comment_author_IP`, `comment_date`, `comment_date_gmt`, `comment_content`, `comment_karma`, `comment_approved`, `comment_agent`, `comment_type`, `comment_parent`, `user_id`) VALUES
(1, 1, ‘Mr WordPress’, ”, ‘http://wordpress.org/’, ”, ‘2010-08-17 09:48:13’, ‘2010-08-17 14:48:13’, ‘Hi, this is a comment.<br />To delete a comment, just log in and view the post&#039;s comments. There you will have the option to edit or delete them.’, 0, ‘1’, ”, ”, 0, 0),
(6, 151, ‘drieniincanny’, ‘fedasebr@mailnah.co.cc’, ”, ‘94.142.134.144’, ‘2010-11-03 07:52:39’, ‘2010-11-03 07:52:39’, ‘<a href=”http://profiles.friendster.com/122853886″ rel=”nofollow”>levitra levitra</a>\r\n<a href=”http://profiles.friendster.com/122854278″ rel=”nofollow”>60 forum levitra 86</a>\r\n<a href=”http://profiles.friendster.com/122854406″ rel=”nofollow”[…]

MySQL said: Documentation
#1062 – Duplicate entry ‘7’ for key ‘PRIMARY’

===================

Looked at localhost.sql file – found lots of junk comments that don’t show in WordPress. But they were from another WordPress site of mine – in fact it was a dump of the wrong database!

 

Trying again…

Deleted swehs2 database

On justhost.com
Created new database paulhul1_swehs2
Didn’t need to create new database user and password, already created
Added the new user to database paulhul1_swehs2, gave it all privileges

Had already edited the wp-config.php file to match database, user and password

About to import the database using phpmyadmin – but Justhost.com site started being maintained!

Justhost.com came back online, tried to import the database into paulhul1_swehs2 using phpmyadmin
Response:  “Import has been successfully finished” – Success!

 

————

At the six hour mark, the WordPress files download was still going, though it’s moved on from photos to plugins like JetPack.

I wonder whether the Duplicator plugin could exclude the photos, and deal with them via FTP.

Or speed things up by Duplicator backing up to DropBox? Need to check the total size of the download. Uncompressed it’s going to be in excess of 5GB. But I have a terabyte of paid-for space! However, would my host just time out?

A useful-looking Dup;licator writeup is here:
https://www.wpkube.com/move-backup-website-wordpress-duplicator-plugin/

And it’s stopped – more than six hours for wp-content. Finishing off with wp-includes and wp-snapshots. WiFi is on max 100 kbs. Maybe I need to cable up to the router. Needs at least a 12 metre Ethernet cable.

Maplins 20m Red Cat6 UTP Network Patch Cable £29.99, Code: A30UH

Strangely Filezilla shows that it’s copying some files to G:\swehsprototype\histpics\….jpg – but they don’t show up on the G: drive in File Explorer. The remote names are /tactive/histpics/….jpg and /bpics/….jpg. I wonder where those are in the file structure? Sounds like something copied from Marcus’s site.

The wp-snapshots folder takes ages to download as well – it looks like this might be the Duplicator package repository.
I don’t think I needed to back these packages up
– is there anything else in the folder except packages and installer?

Wifi has now speeded up to between 3 and 15 Mbps – that’s better!

==============

 

Connected the PC to the router via cable – very much faster!

(Though my PC had a DNS problem with the Wifi after I disconnected it)

Backup and transfer – part 1

Summary – the automated backup system no longer works because of the size of the data, particularly the photos.

Detail:

Tried Duplicator plugin – see video at:
https://www.youtube.com/watch?v=tdP3quWLM0Q
Warning that large files and total size may cause timeouts

Response:
Build Interrupt
The current build has experienced an issue.
Please try the process again.
Server Status: 405 -Not Allowed
Error Message:
405 Not Allowed
nginx/1.10.2
Build Folder: /home4/paulhul1/public_html/swehs/wp-snapshots/tmp

  • Note: This is visible on FileZilla as just  /swehs/wp-snapshots/tmp/

Some servers close connections quickly; yet the build can continue to run in the background. To validate if a build is still running; open the ‘tmp’ folder above and see if the archive file is growing in size. If it is not then your server has strict timeout constraints. Please visit the support page for additional resources.

Looked in the ‘tmp’ folder – archive file was not growing in size, therefore unsuccessful.

Did “Try again” – same result.
Detailed explanation here:
https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-100-q

Next step will be to try a manual backup and migration – see:
http://www.wpexplorer.com/migrating-wordpress-website/

May be best to:

  1. Trial manual download
  2. Trial upload to a duplicate folder “/wphs” on Paul’s hosting (Would need to create a new MySQL database)
  3. Buy new hosting and set up new Society name and URL(s) e.g. wpehs.org, then upload there

Histelec News and Supplements 63 and 64 added

Histelec News 63 and 64 added
Supplements 63 and 64 added

2017 events added and minor updates

2017 events added to events diary – to be updated again after 14 Feb committee meeting.

MOJO Marketplace plugin updated.

Twenty Thirteen and Twenty Twelve themes updated (though this site actually uses Hemingway theme)

Adding CEGB and CEB photo folders

All 11 CEGB folders – around 800 photos – have now been imported

Previously imported
SWEHS 5.1 CEB & CEGB Oakfield Road Bristol

Imported 28/10/2016
SWEHS 80.0 CEGB Pembroke Icing
SWEHS 81.0 CEGB Power Stations
SWEHS 82.0 CEGB Final Days of Portishead Power Station

For some reason no data was imported for 82.0 – should be in Table 4.
Uploaded Table 4 again using Filezilla, ran Import again, data uploaded.
Concluded that uploaded version of CSV may have been corrupt.

This is useful for any future instance of “no data” if the data is actually in the CSV.

Imported 31/10/2016
SWEHS 87.0 CEGB Durley Park
SWEHS 88.0 CEGB Overhead Lines and Projects
SWEHS 89.0 CEGB Miscellaneous
SWEHS 90.0 CEGB Severn Cable Tunnel
SWEHS 91.0 CEGB Steel Tower Lines Post Nationalisation
SWEHS 83.0 CEGB and SWEB Bulk Supply Points
SWEHS 85.0 CEGB Two Tier Project 1985

Older posts

© 2017

Theme by Anders NorenUp ↑