Upgraded to WordPress 5.7 “Esperanza”

I finished upgrading all the nineteen (19) Websites and blogs that I maintain using WordPress as a CMS (Content Management System) and as a blog publishing platform to WordPress 5.7 “Esperanza”.

During the upgrade, I encountered a few problems. Before and after the upgrade, I would check “Site Health Status” of the site and then try to resolve the problems.

I encountered a problem regarding HTTPS on one of the Websites but was able to resolve it by temporarily changing the theme of that particular Website which I intend to redesign later.

I also encountered a problem regarding PHP version but resolved it too by upgrading to PHP 7.4 as recommended.

Another problem was, the authorisation header was missing according to “Site Health”. I simply flushed the permalinks as indicated below the message.

When flushing permalinks did not work, I just checked the file “.htaccess” and looked if the new line below was added between “RewriteEngine On” and “RewriteBase /”. If it was not added, I just added it.

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Old WordPress .htaccess codes

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

New WordPress .htaccess codes

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

There were a few more minor problems but they can be ignored for a while. I will resolve them as soon as possible.

I did not check the new features of WordPress 5.7 “Esperanza”. I just would like to upgrade to the new version, just for the reason of upgrading all the Websites and blogs.

If you like the new features of WordPress 5.7 “Esperanza”, upgrade now but do not forget, backup your databases and files first before upgrading your blogs and sites.

By the way, if you noticed, I have no post regarding WordPress 5.6 “Simone”. It takes time to upgrade all the Websites and blogs as I maintain quite a few, so I intentionally skipped upgrading to WordPress 5.6 “Simone”.

Responsive Minimalist One-Column WordPress Theme for Sehdi.com

I finished the new responsive minimalist one-column WordPress theme for SEHDI.com | Sofie Estolloso Hofmann Designs International. I revised the web design for several days but in non-consecutive days.

I have been trying to work on it for quite a long time already but I always ended up not finishing what I started.

It was on December 22, 2019, when I finally began converting the Fluid Two-Column WordPress Theme for Sehdi.com into a responsive minimalist theme but was not able to finish it again.

I continued revising the web design on January 03-04, 2020, but did not upload the theme as it was not completely done yet.

Finally, I finished the new WordPress theme for Sehdi.com on September 04-05, 2020. I uploaded the responsive minimalist one-column WordPress theme but that was after I upgraded the WordPress software to WordPress 5.5 “Eckstine” and WordPress 5.5.1 Maintenance Release.

This Sehdi.com version five has only one column. It is almost the same with Sehdi.com version four except for the comment section and sidebar which I totally removed.

As the sidebar on the right side had been removed, I made the header, content, and footer centered, so it would look better on mobile phones other than desktops and laptops.

I deleted a few codes at the PHP pages that were not necessary anymore aside from just tweaking the CSS or the cascading style sheets.

I then made a few minor changes on October 09-10, 2020, just to clean the codes and polish the new theme.

I again uploaded the new theme on October 12, 2020. I then checked if there were errors online by looking at the page source with the Web Inspector.

For some reason, there were errors regarding the embedded link codes at the content especially the codes for WordPress 4.4 “Clifford”, WordPress 3.5 “Elvin”, WordPress 3.4 “Green”, and WordPress 3.3 “Sonny” videos.

The VideoPress links have been changed, so I updated the embedded video links at the content section. Unfortunately, the errors still occurred.

I might be wrong but as I see it, VideoPress needs to do something about those errors as they were beyond my control.

There might be some more errors on my past posts but I did not check anymore. If those errors persist, I might remove the embedded videos later.

WordPress as CMS for Pandan.gov.ph

I converted Pandan.gov.ph, the Official Website of the Municipality of Pandan, Antique, Philippines, from simple PHP to WordPress as CMS. I actually revised the Website a few months ago but I did not write about it.

I designed this Website in 2005 and it was officially online on April 01, 2005. I also paid for the hosting of the Website. But more than two (2) years ago, I gave up maintaining the Website but did not give up hosting it yet as I would like to turnover the Web content maintenance of the site to Pandan Local Government Unit.

This year, upon my request, Mayor Tan, the new mayor of the Municipality of Pandan, Antique, Philippines, decided to maintain the Website and so I converted it to WordPress CMS.

The web design is still the same, based on the original web design of Pandan.gov.ph when it was still using simple PHP and before that using simple XHTML, except for the navigation menu on top of the page as it is a dropdown navigation menu now. Despite the new dropdown navigation menu, I left the other navigation menu by section on the left side of the page.

I used the Pages feature for most of the pages on this Website and used the Posts feature for the gallery, news and bid sections. If there are any updates on the site, the readers will be able to see them immediately at the front page.

When it comes to WordPress Plugins, this Website is using three (3) plugins only, Akismet, WordPress Stats, and User Role Editor.

It took me at least four (4) weeks to finish redesigning this Website.

How to back up Database via phpMyAdmin

Every time you update or upgrade your blog or website you are always being advised to back up your files and database.

You actually know how to upgrade your WordPress blog, for example, because of the WordPress Automatic Upgrade feature but you have no idea how to back up your database.

So, how would you back up your database?

There are several ways on how to back up your database but in this case I will show how to back up your MySQL database via phpMyAdmin.

How to back up MySQL Database via phpMyAdmin?

1. Locate your Databases or phpMyAdmin at the Control Panel of your account.

If you don’t know how to locate your database, read the following blog entries on how to locate MySQL Databases at the Control Panel.

How to locate Databases or phpMyAdmin at the PLESK Control Panel
How to locate Databases or phpMyAdmin at the H-SPHERE Control Panel
How to locate Databases or phpMyAdmin at the DREAMHOST Control Panel

Sometimes, you do not have to login at the Control Panel to login at the phpMyadmin.

But first, you need to find that link to your phpMyAdmin at the provided Control Panel.

2. Launch the phpMyAdmin from the Control Panel if you already found your Database or phpMyAdmin.

If you already know the link to your Database or phpMyAdmin, bookmark it for easy access.

Access the phpMyAdmin via the browser if you already know the link to your Database or phpMyAdmin.

Once you launched the phpMyAdmin or accessed the phpMyAdmin via your browser you might be required to login.

How to backup Database via phpMyAdmin

How to backup Database via phpMyAdmin

3. Type your database username and database password if you will be required to login.

Please take note that the database username and password are different from your Control Panel username and password.

4. Click the Login button.

Once you clicked the Login button, you will be redirected to the main phpMyAdmin page.

How to backup Database via phpMyAdmin

5. Click “Databases” to view your database or databases if you have more than one database.

You will be redirected to a new page where you will see your “Server:mysql” or “Server:localhost” depending on what the server is.

You will also see the menu type like Databases, SQL, Status, Variables, Charsets, Engines, Processes, Export, and Import.

You will see two columns namely the Database column and the Collation column.

How to backup Database via phpMyAdmin

I will not explain to you what those titles are all about but will only show you how to save or back up your database via phpMyAdmin.

6. Click the appropriate database name, the “database_sample” that you would like to back up.

You will be redirected to another page showing you two important things “Server:localhost” or “Server:mysql” and “Database: database_sample” above the menu type like Status, SQL, Search, Query Export, Import, and Operations.

How to backup Database via phpMyAdmin

7. Click Export among the menu.

You will be redirected to another page.

8. Check SQL and Check Select All to save all the data in your database.

9. Check Add DROP TABLE if not checked.

10. Check Add IF NOT EXISTS if not checked.

At least the four options under Structure except and before Add CREATE PROCEDURE.

11. Check Data, Complete inserts, Extended inserts, Use delayed inserts except Use ignore inserts.

Export type is INSERT.

12. Check Save as file.

Leave the File name template as it is.

13. Check None as Compression to save the database as simple text.

14. Click Go on the bottom right side corner.

How to backup Database via phpMyAdmin

Wait for it until the database file was downloaded.

Once it was downloaded, the database file has a “.sql” file extension as you checked SQL.

15. Save the file to any folder you want.

That’s it.

Now you know how to back up your database via phpMyAdmin.

What else?

You have the option to save a zipped file or a gzipped file.

Check the zipped or gzipped as Compression and follow the same procedure.

Once it was downloaded, the database file has a “.sql.zip” file extension for zipped file after the database filename like “database_sample.sql.zip” and a “.sql.gz” file extension for gzipped file after the database filename like “database_sample.sql.gz”.

What else?

Before you do this, be very careful! I would not want you to lose your data just because your server is slow.

Uncheck Save as file, check None as Compression and click Go if you would like to see the database in text format without saving it.

This is just to show you how your database looks like.

Wait until everything is visible.

If you see the text, that’s it!

What else?

Click the database name “database_sample” at “Database: database_sample” to return to the previous window if you would like to backup the database.

Click Export again, and follow the same procedure from number 1 to number 15.

Again, that’s it.

WARNING:

Do not do anything other than what I wrote here. I said, do not do anything other than what I wrote here.

Be very careful when clicking the icons, especially the empty icon, drop icon and delete icon. If you make a mistake, your database might be gone in just a few seconds.

WordPress 2.8 to WordPress 2.8.4 wp-config-sample and wp-cron files, no closing tags

The first thing I did after I downloaded WordPress 2.8.4 was checking the wp-config-sample.php and wp-cron.php files. I saw that the closing tags are still missing. Since the release of WordPress 2.8, these two files have been missing the closing tags but I did not write about it as it is easy to correct it by simply closing the new wp-config.php file which is a copy of wp-config-sample.php file.

I actually have been wondering why wp-config-sample.php and wp-cron.php files have no closing tags? What I know is every file that has an opening tag “<?php” must have a closing tag “?>” as well. So I am not sure why these two particular files were not closed. I guess they were just overlooked and nobody reported it.

Nowadays, since we are normally upgrading our blogs and sites automatically using the WordPress automatic upgrader, wp-config.php is not being deleted nor replaced. So if you upgraded your blog or site from WordPress 2.7 using the WordPress automatic upgrader, then there is no problem as the old wp-config.php file has definitely a closing tag.

Even if you manually upgraded your blog or site, as long as you did not delete nor replace your wp-config.php file, then your wp-config.php file has definitely a closing tag. Normally, you do not delete nor replace the wp-config.php file anyway every time you upgrade.

The problem now is, if you installed WordPress especially WordPress 2.8 or any of its security releases for the first time for your blog or site. If you copied wp-config-sample.php file and created the new wp-config.php file without supplying the closing tag then your wp-config.php has definitely no closing tag.

As to wp-cron.php file, the old file will be replaced by the new file, so the new wp-cron.php file should be corrected manually as this file has definitely no closing tag.

Regarding other files, I did not check the other files, so I do not know if there are more files that do not have closing tags.

Solution to WordPress 2.7.1 Gallery Code Problem

I tried to find a solution to the WordPress 2.7.1 gallery code problem. I checked some templates first but I was not able to identify the right one. So I searched the web and I found the solution from this blog entry, Problem with WordPress 2.7.1 and images.

I was looking into several templates like link-template.php and post-template.php but did not think about the post.php file. With his solution, I was able to solve my problem that I told you in my previous blog entry.

This was the PHP function wp_get_attachment_url at WordPress 2.7.

function wp_get_attachment_url( $post_id = 0 ) {
	$post_id = (int) $post_id;
	if ( !$post =& get_post( $post_id ) )
		return false;

	$url = '';
	if ( $file = get_post_meta( $post->ID, '_wp_attached_file', true) ) { //Get attached file
		if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) { //Get upload directory
			if ( 0 === strpos($file, $uploads['basedir']) ) //Check that the upload base exists in the file location
				$url = str_replace($uploads['basedir'], $uploads['baseurl'], $file); //replace file location with url location
		}
	}

	if ( empty($url) ) //If any of the above options failed, Fallback on the GUID as used pre-2.7, not recomended to rely upon this.
		$url = get_the_guid( $post->ID );

	if ( 'attachment' != $post->post_type || empty($url) )
		return false;

	return apply_filters( 'wp_get_attachment_url', $url, $post->ID );
}

If you read the blog entry where I found the solution, you will see there the present PHP function wp_get_attachment_url at WordPress 2.7.1.

I just commented (using // before each line) the following four lines which was added or included or inserted at the PHP function wp_get_attachment_url at the post.php when WordPress 2.7.1 was released. You will find post.php file under wp-includes folder.

elseif ( false !== strpos($file, 'wp-content/uploads') )
				$url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 );
			else
				$url = $uploads['baseurl'] . "/$file"; //Its a newly uploaded file, therefor $file is relative to the basedir.

That’s it. That’s the solution to my gallery code problem. Thank you, emmanuel-georjon.

Boracaydivers.com converted to XHTML and PHP

Boracaydivers.com had been converted from HTML to XHTML and PHP. I actually finished converting the site within a day on the first week of March but since I was busy with other matters I was not able to write about it. There were no other major changes and the design remains the same.

On other matters, maybe it’s a bit late but it is still important. You might not have read about it yet. For those of you who still have WordPress 2.1.1, please upgrade your WordPress 2.1.1 to WordPress 2.1.2. I was also not able to write about it here but a few hours after I read the announcement at WordPress “WordPress 2.1.1 Dangerous, Upgrade” I immediately upgraded all my sites using WordPress 2.1.1.

Even if I downloaded WordPress 2.1.1 earlier than what was stipulated at the announcement when the original code had been possibly modified I still upgraded all my sites. It was probably not affected but then WordPress declared version 2.1.1 dangerous and released version 2.1.2.

Just to inform you, I don’t write all my updates here especially if I update the other sites, so please visit my other sites once in a while for site updates.

Upgraded to WordPress 2.1 Ella

I finished upgrading the sites using WordPress from WordPress 2.0.7 to WordPress 2.1. Upgrading a WordPress site is not that complicated. What makes the site complicated when being upgraded? If some tags were deprecated, some features were removed or transferred, and if the Plugins, if you have any, aren’t compatible with WordPress 2.1 Ella.

There were no major problems with SofieHofmann.com Blog as it is a blog. I just have to check my blog entries for XHTML validation. I corrected a little bit at CSS file as my images are always centered but the text are always justified. All of a sudden, the centered text were adjusted to the left. They’re ok now.

With Sehdi.com, I had to redo the conditional tags because of the feature that a static page can be assigned to the front page. I did both the code for a static page as well as for the latest posts, so even if I switch from one to another, the pages won’t break and won’t be affected at all. No matter what, I can assign a static page or the latest blog posts anytime to the front page. I haven’t use this feature with other sites yet. One thing though, the quicktag <!--more--> doesn’t work but the quicktag <!--nextpage--> works. I still have to figure out the solution to the <!--more--> quicktag.

With Weggis.net, I needed to remove some conditional tags at the archives, having the articles after each topic. Sometimes they appear, sometimes not. Instead, I changed the number of articles at the individual archives. So if you check each topic archive, all the titles of the articles are there aside from the latest one on top of all the other ones.

With Pagtatap.org, there’s not a lot of problems, as it was just newly redesigned.

With Pandan.gov.ph News, it was just like Sofiehofmann.com Blog. I just fixed the CSS because of the floating images to the right, and XHTML for validation.

With Pandan.ph, I have more problems with one of the Plugins. I’m using a Paged Comments Plugin in this site and it was not working with PHP include <?php include (file.php); ?> unless you put the TEMPLATE PATH before file.php. I also have Paged Comments Plugin at Pagtatap.org but this problem didn’t occur there as I was not using too much page templates unlike with Pandan.ph. Anyway, I was able to fix everything.

For all the other sites, I needed to change the deprecated template tags, wp_list_cats to wp_list_categories and get_archives to wp_get_archives. Actually, as of the moment, even if you didn’t change them, they will stay the same, won’t really affect the site.

Regarding the links being part of categories now, if you have get_link_list and opted to check show description, it’s not working now. That option was removed from the admin side, and so, I replaced get_link_list with wp_list_bookmarks.

I’ve written something about a Plugin. What about other WordPress Plugins?

I don’t use too many WordPress Plugins. So far, I have these Plugins but not in all the sites.

Akismet Plugin by Matt Mullenweg, WP-PostViews by GaMerZ, Post Updated by Kaf Oseo, Peter’s Custom Anti-Spam by Peter Keung, Sidebar Widgets by Automattic, Simple Recent Comments Widget by Mika Perälä, randomimage by Justin Watt, Filosofo Home-Page Control by Austin Matzko. No problem with all these WordPress Plugins.

SRG Clean Archives Plugin by Shawn Grimes. I have to fix the post_status='publish' to post_type='post' as I don’t want the pages to be part of the monthly archives.

Paged Comments Plugin by Keyvan Minoukadeh. I already mentioned about the Paged Comments Plugin and fixed the problem.

Counterize II Plugin by Steffen Forkmann. I deactivated this Plugin except at Sehdi.com and SofieHofmann.com Blog even before upgrading to WordPress 2.1. It’s in conflict with the Google Search that I’m using. I couldn’t fix it yet. I’m always getting a message above the page referring to the database. But if I just use the normal WordPress search, no problem at all.

WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1]
update wp_Counterize_Pages set count = count + 1 where pageID =

Everytime I activate the Plugin and test google site and web search, the message above appears and another one and another one. I haven’t asked the author of the Plugin yet about this, hoping that I will solve it myself. But since I’m not a MySQL guru, I still have to figure it out. As I see it, I think the solution is just simple and it’s just there but I haven’t really figured that out yet.

WordPress Database Backup Plugin by Scott Merrill. I never really used WordPress Database Backup as I backup my database from the phpMyAdmin itself. I just tested it and eventually deactivated again in the other sites. No matter how I changed the File Permission of wp-content, it’s just not working in other sites. It’s not creating index.php at the backup folder and so I couldn’t backup my database. So as not to put the security of wp-content in danger, I just deactivated the Plugin except at the 2 of all the 6 sites.

Well, that’s all for today. Other than what I have mentioned above, everything is ok. All the sites are fine and running without any problems. Thanks to WordPress Team! Thanks to WordPress Plugins authors!

Sehdi.com converted to WordPress as CMS

I finally converted www.sehdi.com from simple PHP to WordPress as CMS (Content Management System), specifically using the new released version WordPress 2.0.5. It could have been an easy conversion but I was making sure that everything should be in order including my codes before I publish the new converted site.

It took me five days to finish the whole thing. For one thing, even if no one sees the codes, MySQL database, and folders, except me of course, I make sure that they’re not messy. Another important factor is the CSS (Cascading Style Sheets), naturally, I revised the CSS (Cascading Style Sheets) too.

I did not install another WordPress for the whole site but integrated it with the existing blog. I just wrote a few codes and everything went fine. It almost looks the same as the original web design.

Another update, I already upgraded www.weggis.net from WordPress 2.0.4 to WordPress 2.0.5.

That’s it! I’m into converting sites from simple PHP to WordPress as CMS at the moment.

For those who are linking my blog from your website or blog using the RSS feed, please update your link from https://www.sehdi.com/blog/feed to https://www.sehdi.com/feed. Although https://www.sehdi.com is not really my blog rather https://www.sehdi.com/blog, but since sehdi.com is now using WordPress as CMS and blog was added as a page, blog updates will only appear if you update your RSS feed. It’s because of the conversion.

Thanks!

Update: No need to do anything about the RSS feed, I managed to make both https://www.sehdi.com/feed and https://www.sehdi.com/blog/feed work.

WordPress as CMS for Pandan.ph

I decided to use WordPress as CMS (Content Management System) for my sites. I already started using it as a CMS at Weggis.net. Weggis theme is based on the original design of Weggis.net when it was not using WordPress, PHP and XHTML yet. I also made several code updates at the other pages using PHP.

I also revised Weggis.net search capability. Weggis.net search is not only searching posts or entries in categories (normally the updates) but other pages as well.

Since several search engines have already indexed Weggis.net, especially google, I also placed google search at Weggis.net as another option to search the site. I also implemented this in my other sites.

Then, I revised Pandan.ph once again. This time though, WordPress is not only being used for the News and Gallery Pages. I used WordPress, specifically WordPress 2.0.4 version, as CMS for the whole site.

I just revised the codes so the web design is still the same. This WordPress theme is based on the original design of Pandan.ph when it was also not using WordPress, PHP and XHTML yet.

I also installed a new guestbook using WordPress Paged Comments Plugin. I removed the comments capability for the gallery, news and other pages. Instead of commenting at the news page and its subpages, people can only now leave their messages at the guestbook.

I removed the CGI script used for my contact page and used WordPress comment capability instead with Akismet Plugin so that comment spams could be caught and de-spammed. Comments that were de-spammed will be submitted to Akismet as mistakes so it can learn and get better.

To use Akismet, I needed Akismet WordPress.com API Key, so I opened an account with WordPress.com but then opted not to get a username only but registered a blog too, sofiehofmann.wordpress.com. I could not use my own theme though. I have an idea what to write there but still thinking of other possibilities.

Anyway, if you look at Pandan.ph, as if, there are no changes at Pandan.ph, but on my part, with regards to coding, it was such a lot of work. I could have written something about it everyday but opted not to do it. I was just too busy.

Other updates: Publications and Media pages of Green Cross Switzerland have been updated.