Invoke phpmyadmin and create a new Database :
http://localhost/phpmyadmin
Database Name wppv: Collation: utf8mb4_unicode_ci
Extract and install WordPress
Extract wordpress to a new Location - like : D:\xampp\htdocs\pv
Run : http://localhost/pv/wp-admin/install.php
Datbase Name : wppw
UserName : root
Password :
Database Host : localhost
Table Prefix : wp_
Install WordPressConfigure Workpress
Site Titel : PV Test
UserName : admin
Password : Felixxxxxx
Email : helmut.hutzler@gmail.com
Test your WordPress Connectivity
Default URL: http://localhost/pv
Admin URL: http://localhost/pv/wp-admin/
Verify your WP settings
D:\xampp\htdocs\pv>more wp-config.php
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wppx');
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', '');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
Currently I’m using 2 PlugINs and I’ve disabled WYSIWYG Editor for my WordPress Projects
Insert_PHP [ used to run PHP code ]
Raw HTML [ need to be version 1.5 – 1.4 converts HTML during saving the Code
Disable Visual Editing first User -> Profil -> Disable WYSIWYG Editor
Note : You CAN’T run [insert_php]…[/insert_php] Block inside a .. Block Raw Html need to be at version 1.5 !
Insert_PHP Plugin:
Descriptiuon:
Run PHP code inserted into WordPress posts and pages.
- In the sample below we use Insert_PHP Plugin to call get_stylesheet_directory_uri()
- get_stylesheet_directory is used by Child Themes [ here we reference an Image location]
Sample:
<td class="firstImageAbu" rowspan="5"><img src=[insert_php]echo get_stylesheet_directory_uri()."/images/htmlImages/abu1.jpg
alt='Sponsoren FCW' width=215 />";[/insert_php]</td>
Raw HTML PlugINDescripton:
Lets you enter any HTML/JS/CSS in your posts without WP changing it, as well as disable
automatic formatting on a per-post basis. Usage: Wrap your code in ... tags.
To avoid problems, only edit posts that contain raw code in HTML mode. Upgrade to Pro
to be able to use Visual editor on the same posts without it messing up the code.
Note: Used that PlugIN for a ControlPanel. Without that code the Buttons get strange aligned when
using <CR> to beautify your Code !Sample:
<div id="AbuControlPanel">
<input id="infoButton" class="mediumButton" type="submit" value="" />
<input id="homeButton" class="mediumButton" type="submit" value="" />
<div id="AbuButtonGroup" class="button-group">
<input id="stopButton" class="mediumButton" type="submit" value="" />
<input id="playButton" class="mediumButton" type="submit" value="" />
<input id="prevButton" class="mediumButton" type="submit" value="" />
<input id="nextButton" class="mediumButton" type="submit" value="" />
</div>
</div>
Nothing to add here just install the WordPress Plugin
Step2 : Create a Package and upload Installer.php and archive to your local host
Duplicator -> Package -> Create New -> Next
Create a New Package
You can ignore the Database Warning [ see video below ]
Lets have a closer look on the PHP errors
Ignoring that Warning for now – but notice that I’m not able to restore that package on the original Server again —> Not a good situation but lets move forward
Check:
BUILD the package
Finally if we don’t get a timeout you will see the following message .
Click on both buttons to download the both files
Note : Even you may get a Timeout the action may still run successfully to the end
Step 3 Create a MySql Database via phpAdmin
Step 4: Deploy the WordPress Backup to our local XAMPP webserver
Verify both files are under the proper newly created directory [ xampp\htdocs ]
Invoke installer.php and test your MySQL connection
Testing MySql Database worked fine
Update Files and Database
Apply Final Steps
Test Site
Security Cleanup
Testing the duplicated Website
As you see the Website Duplication to our localhost works!
Now you can remove the Duplicator Files by running Security Cleanup
Provide access to global URL admin-ajax.php and export this function to our WP POST
Use wp_enqueue_script to make JavaScript file my-ajax2.js accessible in our WP Post
Use wp_localize_script() to make URL admin-ajax.php useable in our scripts
Even though the admin-ajax.php resides in the admin area of your site, you can use it to process interactions from the front-end, as well as the back-end
In WordPress all Ajax requests are sent to admin-ajax.php for processing.