Showing posts with label Wordpress. Show all posts
Showing posts with label Wordpress. Show all posts

Wednesday, 19 June 2019

Retrieving the Posts and Pages from Wordpress Database.

Sometimes shit happens. Client took backup only the Wordpress DB without taking the PHP files. In other words, configuration, plugins, custom templates, skins and images.... just lost. Last Well Known good backup gone with the server.... and what we only got is a Wordpress DB without images. So practically, it would be a better idea to backup one by one pages from browser by clicking Save as.... Just jogging of course...

Now he has to write everything from scratch.

Step 1.

Examine your backup file:

-- MySQL dump 10.13 Distrib 5.5.55, for Linux (x86_64)
-- Host: localhost Database: wordpress9
-- ------------------------------------------------------
-- Server version 5.5.55

Step 2:

Go to MySQL and download the exact server version your previous installation comes from. Here is our link:

Install the MySQL temporarily in your PC or a simple VM or anything else.

Step 3:

Create a Database in your server just like the backup specifies:

C:\Users\>mysql -uroot -pmypass

mysql> CREATE DATABASE wordpress9 CHARACTER SET utf8 COLLATE utf8_general_ci;

Query OK, 1 row affected (0.01 sec)

Step 4:

Copy your backup file. Edit your backup file

Restore your last backup in the server

C:\Users\>mysql -uroot -pmypass wordpress9 < backup_2019_01_18_1547817726_4347121_wpdb.sql

Step 5:

Create a file called restore.sql with the following query to retrieve your posts, pages and news:

select '<h1>',post_title,'</h1>',post_content, '<hr/> End Post <hr/>' from wp_posts where post_status='publish' and post_type in ('page','post','nooz_release') order by post_name, post_date ;

Step 6:
Run the query command as follows:
C:\Users\>mysql -uroot -pmypass wordpress9 < restore.sql > restored.html

The results are inside restored.html and can be viewed with a browser.
More careful backup next time....

Tuesday, 15 March 2016

Set your HTML META tags in WordPress

Hi folks!

I think there is no much need to tell you how important are HTML META tags for SEO for your site.
So in order to have a simple touch of perfection, you just have to edit the following META tags:

<meta name="" content="Illumine Consulting - Europe" property="og:title"/>
<meta name="" content="website" property="og:type"/>
<meta name="" content="technology" property="website:tag"/>
<meta name="" content="cloud computing" property="website:tag"/>
<meta name="" content="b2b" property="website:tag"/>
<meta name="" content="science" property="website:tag"/>
<meta name="" content="" property="og:url"/>
<meta name="" content="" property="og:image"/>
<meta name="" content="Illumine IT Consulting - Greece" property="og:site_name"/>
<meta name="" content="For more than ten years Illumine IT Consulting " property="og:description"/>
<meta name="" content="1392144595" property="og:updated_time"/>
<link href="{+PageId}" rel="publisher" />
<meta name="" content="" 
<meta name="robots" content="index, follow" />
<meta name="keywords" content="illumine, IT, technology, consulting, services, software,mountrakis" />
<meta name="generator" content="illumine it consulting" />
<meta name="author" content="michael mountrakis" />
<meta name="copyright" content="Copyright (c) Illumine Consulting. All Rights Reserved." />
To do so, go to your WordPress admin panel Then in the left menu select Appearance, Editor and select to edit header.php file. Then add your meta tags just like the following picture illustrates:

Tuesday, 8 March 2016

Implement Redirects withing WordPress and Eggplant 301 Redirects

The easiest way in order to add a redirect in your Wordpress site is by installing Eggplant 301 Redirects Plugin. 

To do so login to WordPress as administrator

On the Left side menu go to Plugins --> Add New -->

Now in the Add Plugin page you have to add the word "eggplant" in the textfield and click "Install now"

The last part is to add a redirect. To do so, go on  the Left side menu go to Settings --> EPS Redirects

 And finally add the redirect to your Wordpress page using Eggplant plugin redirect management: