Thereโs a bit of a dual purpose tutorial going on today, the dual purposes being โฆ
- Showing you some WordPress Migration tactics, again, but this time involving Windows (local Apache/PHP/MySQL web server) MAMP, as distinct from the conditions during the previously discussed WordPress Upgrade Crontab Curl Tutorial โฆ and โฆ
- Navigable PDF, via hashtagging, in an HTML iframe approaches to presentation
That latter purpose was a bit of a doh! moment for us, as weโd neglected to use this useful hashtagging technique of defining a URL like โฆ
//www.rjmprogramming.com.au/MAMP/wordpress_populate.pdf#page14 ... or ... //www.rjmprogramming.com.au/MAMP/wordpress_populate.pdf#page=14
โฆ ever in the past โฆ as the src= value in an HTML iframe element (but weโve found cross-browser issues, so weโll also be supplying an HTML a link equivalent to show PDF in new window) to show (how we made HTML blog posting editing mode be the default over the installed default setting of Visual edit mode, via a change to the Twenty Seventeen themeโs function.php as mentioned in that previous Tablet Run Web Server Blog PHP Tutorial as shown below โฆ thanks to this useful link for the advice here) โฆ
//www.rjmprogramming.com.au/MAMP/wordpress_populate.pdf#page14 or //www.rjmprogramming.com.au/MAMP/wordpress_populate.pdf#page=14
โฆ as an alternative to just displaying that (in) image(s) as per โฆ
We want to point out an advantage here of there being less files needing to go over to the web server to achieve any sequence of display items you care to think of. Versus a disadvantage is that it involves a more resource hungry set of circumstances for the web browser. However, this resource hungriness is offset by caching you have going, because hashtag (#) navigation can use whatever is in the (web browser) cache from a previous hashtag (#) URL mentioning that one โcollectiveโ PDF โviewโ of all the โimageryโ the once. Come to think of it in this way, and perhaps the โnavigable PDFโ approach is less resource hungry?!
Now what about the WordPress migration today? Whatโs new with the approaches? Because we are talking WordPress posts and pages to WordPress (on MAMP) posts and pages, we think just stick with the โฆ
- WordPress Exporter Plugin to XML
- WordPress Importer Plugin from XML (at the MAMP end, and we ran into problems installing this plugin so resorted to the alternative method shown by โฆ
//www.rjmprogramming.com.au/MAMP/wordpress_populate.pdf#page6 or //www.rjmprogramming.com.au/MAMP/wordpress_populate.pdf#page=6
)
โฆ though โฆ
- it says for the WordPress Importer it has not been tested for this recent WordPress release โฆ and โฆ
- there are quite a few third party plugins that might do a good job, but finding a pairing of Exporters and Importers that had been tested for both the โdata fromโ and โdata toโ WordPress versions seemed difficult to find
โฆ and thatโs where the configuration of php.ini regarding POST_MAX_SIZE and UPLOAD_MAX_FILESIZE settings (being far too low by default, just for this migration task) only on the Importer side, becomes important, and therefore weโd like to direct you to this slide โฆ
//www.rjmprogramming.com.au/MAMP/wordpress_populate.pdf#page9 or //www.rjmprogramming.com.au/MAMP/wordpress_populate.pdf#page=9
โฆ to see some of the โฆ
- use of MAMP โPropertiesโ to determine a PHP version
- stop MAMP servers
- edit the appropriate MAMP php.ini
- start MAMP servers
- proceed with WordPress (migration) import of Exported XML data via WordPress Importer plugin
Here is a PDF slideshow showing some of this. Bear in mind, this export then import migration task relates only to the transfer of category, tag, post and page MySQL data information from one rjmprogramming.com.au domain WordPress MySQL database to MAMPโs WordPress MySQL database. So, yes, this job might be undertaken at a MySQL database migration level (perhaps involving the โgive us a Pโ โฆ P โฆ โgive us an โHโ โฆ H โฆ you know what we mean โฆ phpMyAdmin), but that is not how we have โrolledโ today. Again, like yesterday, and the day before it comes via the use of HP PhotoSmart Premier software suite via the creation of a project and then shaping to Print this, and picking the Microsoft XPS Writer printer (and once again thanks to Free online XPS to PDF converter).
Previous relevant Tablet Run Web Server Blog PHP Tutorial is shown below.
Today, we follow up on yesterdayโs MAMP on Windows Primer Tutorial as shown below, by installing a WordPress.org (as distinct from the WordPress hosted WordPress.com) blog onto Windows via a local MAMP local web server, and using the current default WordPress theme called โฆ you guessed it โTwenty Seventeenโ.
This Twenty Seventeen theme, by default, we notice, constructs blog postings in non-HTML mode, which could please those users wanting to ease their way into learning HTML as they start blogging. But we noticed changing the โFind Usโ Contact Page details, there the HTML was, so am still strongly advocating that you learn some HTML anyway.
Roughly speaking, the steps involved were โฆ
- Download from WordPress.org the blog installer in the form of a zip file, which you can decide to Open directly, or save to your Windowโs user Downloads folder, and then double click โฆ to โฆ
- Open your default unzipper (WinZip here) via right click and Open Withโฆ WinZip โฆ
- Click Extract โฆ
- Type in โC:\MAMP\htdocs\โ ( ie. MAMP document root, equates to //localhost:8888/ ) as the place to extract to โฆ
- In Windows Explorer, to rename the C:\MAMP\htdocs\wordpress directory now would affect the URL we talk about below โฆ but we assume in all that follows that you stuck with โwordpressโ here โฆ
- In your web browser (we have Google Chrome today) type in URL of //localhost:8888/wordpress โฆ
- Choose main language (and we choose English) โฆ
- That being the case we opened //localhost:8888/MAMP/index.php?page=phpmyadmin&language=English to start up the incomparable, the never before seen in this country at this time and in these weather conditions, โphpMyAdminโ to, if you havenโt already done so โฆ
- Click the โNewโ (database) link โฆ
- Fill in the new name for a database (and we use โwordpressโ here) โฆ
- Click the โCreateโ button โฆ which creates a shell of a MySQL database ready for the WordPress install to โinfillโ with data โฆ
- Meanwhile back at the //localhost:8888/wordpress install webpage (assuming you clicked the button after the Language selection) you fill in a form, primarily detailing the blog โฆ
- Database name (for us, โwordpressโ)
- Database username (default, for MAMPโs MySQL is โrootโ, so we are showing that)
- Database password (default, for MAMPโs MySQL is โrootโ, so we are showing that, but, obviously, it is good to change default passwords)
- Database host (default, for our MAMP, but not necessarily for yours is localhost:8899 โฆ as we explained yesterday โฆ install default is โlocalhostโ)
- Database table prefix (their โwp_โ prefix we are happy with โฆ which would infer, for example that post data would reside in localhost:8899โs database called โwordpressโ in table โwp_postsโ)
โฆ and when filled out click button to proceed
- Click the โRun the installโ button โฆ
- Then you get to a form about an administrator username and password and website title and email address โฆ please do not have easy passwords except those suggested by WordPress for internal use only โฆ MAMP is a good place to sort all these issues out before going live โฆ after which you click the button to proceed
- And so you get to a WordPress administrator login screen where those details above come into play, and from then on, you are more or less on your own administering this //localhost:8888/wordpress/ blog โฆ and for a few slides โฆ
- We skim the surface of administering the WordPress blog where we โฆ
- show you some theme alternatives to the default Twenty Seventeen theme we plump for โฆ
- change the โFind Usโ address at the Contact Us menu webpage โฆ
- create a small inhouse posting, when we discovered the default mode of (blog post) creation appears to be no longer HTML (as it is for good olโ Twenty Ten theme โฆ cough, cough) โฆ but โฆ
- Everything was there via the Add Media button and a Paragraph button for us to construct a short
diatribe about Beethovenโs Fifthposting involving some words and an image (added during the โAdd Mediaโ button press)
And so there you have some โฆ
- Blog
- CMS
- WordPress install
- MySQL database management via phpMyAdmin
- WordPress Blog Post creation
- Local web hosting
โฆ but if you are web hosting yourself, with a live blog, on Apache/PHP/MySQL at least, you need to know bits and pieces (all talked about at this blog in varying degrees of detail), in addition to bit more above โฆ
- (s)ftp
- ssh
- cPanel
- phpMyAdmin
โฆ and then, the nice to haves, or develop, are โฆ
- HTML
- Javascript
- CSS
- Linux (or Unix)
- Apache configuration (eg. .htaccess usage and robot.txt)
- crontab
- MySQL off the command line
- Google Webmaster
- get better at SEO than we are
- PHP
- Python
- Perl
- ImageMagick
- GD in PHP
Constructing our PDF presentation of the steps above weโd like to thank โฆ
- HP Photosmart Premier and its great JPG(s) to XPS conversion functionality
- Free online XPS to PDF converter
Enjoy todayโs slideshow.
Previous relevant MAMP on Windows Primer Tutorial is shown below.
Have you noticed when you revisit websites from long ago lots of times functionality regarding platform flexibility has moved on. Web server products in particular are of more benefit to us all if they support multiple platforms.
In that regard we are happy to break a โmythโ that had developed in my mind that the wonderful MAMP local Apache/PHP/MySQL web server was just for use with Mac OS X. It might have been me dreaming, but in any case, it can be used on Windows, currently version 3.2.2.
It behoves us, though, to take a step back and explain why this interest? Letโs just take the concept of a local web server first. We think โฆ
Local web servers are the best way to test code destined for a real and live web server open to the public to test web applications both for the logic and coding within them, and to get close to testing for similar environmental circumstances
โฆ and sorry to break it to you, but short of Ansible type of deployment thinking it is not good to be more definitive about โenvironmentalโ simulation, than the sentence above. Think itโs not worth this โlocal web serverโ bother? For all else, but totally trivial coding, like you may be able to achieve via Javascript, within a blog posting itself (and this is not really advised by the big players anyway), it is just not a good idea not to have tested a web application locally first, especially if it is a serverside language like PHP or ASP.Net โฆ and yes, noticed with the MAMP on Windows install, that .Net Framework comes into the equation.
Now letโs โplonkโ on top of that in our thinking, and this is the motivation for a lot of user interest out there, what about โhow to go about developing a WordPress blog from go to wo (hopefully not woe โฆ chortle, chortle)โ? The same goes here in our mind โฆ
Local web servers are the best way to test products you install from third parties, such as blogs and forums and chatrooms and CRM and CMS websites, destined for a real and live web server open to the public to test web applications both for the logic and coding within them, and to get close to testing for similar environmental circumstances
โฆ to which it would be legitimate to question, given web server interfacings like cPanel (hosting platform) to go with managing an Apache/PHP/MySQL web server, that that sounds like โoverkillโ given cPanel has options to install blog products like WordPress within its menus. We would say to that, that, yes, it has a good chance of working if you use cPanel, that is true, but we would see that it is not going backwards, nor costing any money, with a lot of the products, to โtest runโ them on a local web server, and when satisfied, or not, use cPanel, or some other (s)ftp file transfer approach to get that product up live and running.
Add to that for us, is that weโve had only the smallest of working problems with MAMP on Mac OS X for many years now, and so weโd have to describe it as โrobustโ, and it has an associated MySQL database interface product called phpMyAdmin which is so good itโs thinking of inventing a โphpMyAdmin soupโ.
So that leaves, for us, why move off the EasyPHP (local (WAMP) Apache/PHP/MySQL web server) for Windows product. After all, we readily admit to no issues with EasyPHP here, but we feel that to progress with knowledge, and not let โplatform confusionโ overcome you, you should learn as much as possible about what is out there as an alternative. After all, even though it may not work with your Windows, it did for me, to have the following MAMP ports hold true โฆ
- Apache listener on port 8888
- MySQL listener had a clash on our preferred port 8889 (like it is for Mac OS X), but we had no problem with using port 8899
โฆ which, to many many intents and purposes makes your work coming off Mac OS X local web server work, look heaps (โexactlyโ, if no MySQL connections involved in the code) like your work, perhaps, moving over to, or even integrating with a Windows local web server with the same โMAMPโ (robust) product name.
In short, if you โwant to learnโ WordPress Iโd recommend, strongly, the use of a local Apache/PHP/MySQL web server product like MAMP, whether you are using Mac OS X or Windows.
In long trousers, now, if you โwant to learnโ WordPress Iโd recommend, strongly, to learn some HTML. If you have a local web server, and install WordPress to a local web server, and you are only starting out with PHP, there is a double whammy advantage that you will see PHP WordPress code they talk about at WordPress Codex, the online manual for WordPress code.
But to today, and also with WordPress 4.1.1โs MAMP on Windows Primer Tutorial, and all we did, was โฆ
- Visited the MAMP website โฆ noticed its Windows interface โฆ new to us โฆ so โฆ
- Got on Windows โฆ and installed โฆ
- Started it up and realized Apache started but MySQL didnโt โฆ so did a bit of research at this useful link, thanks โฆand so โฆ
- Changed MAMP Properties so that MySQL listener port would be changed from the 8889 we had to 8899 โฆ restarted โฆ success
Below is another way to summarize the work above โฆ in pictures โฆ yes, an animated GIF, so popular on websites like Tumblr โฆ and able to be constructed quite well on Gifpal, but, today, we are showing you having been constructed inhouse via the techniques that feature PHP writing PHP of Animated GIF via PHP Writing PHP Primer Tutorial โฆ for your perusal โฆ
Previous relevant Animated GIF via PHP Writing PHP Primer Tutorial is shown below.
We find another very useful reason for PHP to write PHP. Today we establish a PHP web application to dynamically create Animated GIF images via some still images, like Gifpal would do.
We have some great open source PHP code to thank for the basis of the functionality we found at Jeroen van Wissenโs very useful link, thanks.
Then we added a more user friendly interface to get the information off the user we need. We present this in an HTML form, which navigates to the same PHP to do the actual assembly of the Animated GIF via techniques where PHP writes PHP โฆ and really needs to, to be useful.
Do you remember, last, when we did some PHP writing PHP functionality โฆ PHP Writes PHP Vertical TextBoxes Primer Tutorial?
And inside the PHP it makes big use of the GD and Image Functions to read and write the image data we assemble via the user information.
This Animated GIF form of animation is the easiest to implement, as it consists of just the one GIF image file, but the user has very little control over the animation settings, such as the delay between stills, one of the settings we ask about in our web application.
Our PHP source code today you could call tutorial_to_animated_gifphp and we redirect you to some live run ideas โฆ
- normal run with HTML form which posts back to itself โฆ live
run
- example GET parameters run (like our tutorial picture)
Hope you find this tutorial useful.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.