<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WordPress &#8211; Deep Core Labs</title>
	<atom:link href="https://deepcorelabs.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>https://deepcorelabs.com</link>
	<description>Building Extraordinary Brands</description>
	<lastBuildDate>Sun, 15 Dec 2024 18:07:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://deepcorelabs.com/wp-content/uploads/2015/09/deep-core-labs-logo-small-50x50.png</url>
	<title>WordPress &#8211; Deep Core Labs</title>
	<link>https://deepcorelabs.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>WP Recovery Tools &#8211; Enter Recovery Mode Without Email</title>
		<link>https://deepcorelabs.com/wp-recovery-tools-enter-recovery-mode-without-email/</link>
					<comments>https://deepcorelabs.com/wp-recovery-tools-enter-recovery-mode-without-email/#respond</comments>
		
		<dc:creator><![CDATA[Miro Hristov]]></dc:creator>
		<pubDate>Tue, 19 Nov 2024 01:38:59 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Recovery Mode]]></category>
		<guid isPermaLink="false">https://deepcorelabs.com/?p=4413</guid>

					<description><![CDATA[&#160; Hey fellow WordPress maintainers! After dealing with countless broken WordPress sites and locked-out admin panels over the years, I finally decided to create something that would make my life...]]></description>
										<content:encoded><![CDATA[<p>&nbsp;</p>
<p class="whitespace-pre-wrap break-words">Hey fellow WordPress maintainers! After dealing with countless broken WordPress sites and locked-out admin panels over the years, I finally decided to create something that would make my life (and hopefully yours) easier. Enter <strong>WP Recovery Tools</strong> &#8211; a single-file emergency toolkit that might just save your bacon when everything goes sideways.</p>
<h2 class="font-600 text-xl font-bold">What is WP Recovery Tools?</h2>
<p class="whitespace-pre-wrap break-words">It&#8217;s a standalone PHP script that helps you recover access and fix common WordPress issues without needing to access wp-admin or rely on working WordPress functions. Think of it as your emergency backdoor when the front door is jammed.</p>
<h2 class="font-600 text-xl font-bold">How to Use</h2>
<ol>
<li><a id="downloadLink" class="download-link" href="/tools/wp-recovery-tools/wp-recovery-tools.txt" download="wp-recovery-tools.php">Download the PHP script</a></li>
<li><em>(If not already, rename it from wp-recovery-tools.php to something like <strong>wp-recovery-tools_[random-string].php</strong>)</em></li>
<li>Upload it to your WordPress root directory (where <strong>/wp-config.php</strong> is)</li>
<li>Access it through your browser: Example: https://exmaple.com/wp-recovery-tools-0727248cdf916d5f.php</li>
<li>Delete it when you&#8217;re done!</li>
</ol>
<p><script>
let link = document.getElementById("downloadLink");
	const randomSuffix = Array.from(crypto.getRandomValues(new Uint8Array(8)))
		.map(b => b.toString(16).padStart(2, "0"))
		.join("");
	link.setAttribute("download", `wp-recovery-tools-${randomSuffix}.php`);
</script></p>
<p>&nbsp;</p>
<p><a href="https://deepcorelabs.com/wp-content/uploads/2024/11/wp-recovery-tools-scaled.jpg" rel="prettyPhoto[gallery-IX03]"><img fetchpriority="high" decoding="async" class="aligncenter wp-image-4402 size-full" src="https://deepcorelabs.com/wp-content/uploads/2024/11/wp-recovery-tools-scaled.jpg" alt="" width="1175" height="2560" srcset="https://deepcorelabs.com/wp-content/uploads/2024/11/wp-recovery-tools-scaled.jpg 1175w, https://deepcorelabs.com/wp-content/uploads/2024/11/wp-recovery-tools-138x300.jpg 138w, https://deepcorelabs.com/wp-content/uploads/2024/11/wp-recovery-tools-470x1024.jpg 470w, https://deepcorelabs.com/wp-content/uploads/2024/11/wp-recovery-tools-768x1674.jpg 768w, https://deepcorelabs.com/wp-content/uploads/2024/11/wp-recovery-tools-705x1536.jpg 705w, https://deepcorelabs.com/wp-content/uploads/2024/11/wp-recovery-tools-940x2048.jpg 940w" sizes="(max-width: 1175px) 100vw, 1175px" /></a></p>
<h2 class="font-600 text-xl font-bold">Key Features</h2>
<h3 class="font-600 text-lg font-bold">1. Recovery Mode Management</h3>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">Generate and manage recovery mode links</li>
<li class="whitespace-normal break-words">Clear all existing recovery links if needed</li>
<li class="whitespace-normal break-words">No need to mess with database queries or code snippets</li>
</ul>
<h3 class="font-600 text-lg font-bold">2. User Management</h3>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">View all WordPress users and their roles</li>
<li class="whitespace-normal break-words">Reset user passwords with a single click</li>
<li class="whitespace-normal break-words">Create new admin users when you&#8217;re locked out</li>
<li class="whitespace-normal break-words">Perfect for when you can&#8217;t access wp-admin or forgot credentials</li>
</ul>
<h3 class="font-600 text-lg font-bold">3. Plugin Management</h3>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">See all installed plugins and their status</li>
<li class="whitespace-normal break-words">Activate/deactivate plugins without accessing wp-admin</li>
<li class="whitespace-normal break-words">Super helpful when a plugin breaks your site or causes the white screen of death</li>
</ul>
<h3 class="font-600 text-lg font-bold">4. Theme Tools</h3>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">List all installed themes</li>
<li class="whitespace-normal break-words">Check current active theme</li>
<li class="whitespace-normal break-words">Switch themes when wp-admin is inaccessible</li>
<li class="whitespace-normal break-words">Great for fixing broken themes or theme-related issues</li>
</ul>
<h3 class="font-600 text-lg font-bold">5. Database &amp; System Tools</h3>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">Database repair and optimization</li>
<li class="whitespace-normal break-words">Clear cache and transients</li>
<li class="whitespace-normal break-words">Reset permalinks</li>
<li class="whitespace-normal break-words">View detailed system information</li>
</ul>
<h2 class="font-600 text-xl font-bold"> Security First</h2>
<p class="whitespace-pre-wrap break-words">The script has several security features built-in:</p>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">If no suffix found, forces you to rename the file with a unique suffix before using</li>
<li class="whitespace-normal break-words">Provides recovery links that expire and have limited use</li>
<li class="whitespace-normal break-words">Uses secure password generation</li>
<li class="whitespace-normal break-words">Implements proper SQL escaping and input validation</li>
</ul>
<h2 class="font-600 text-xl font-bold"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26a0.png" alt="⚠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Important Warnings and Disclaimers</h2>
<p class="whitespace-pre-wrap break-words"><strong>PLEASE READ THIS CAREFULLY</strong></p>
<ol class="-mt-1 [li&gt;&amp;]:mt-2 list-decimal space-y-2 pl-8">
<li class="whitespace-normal break-words"><strong>Backup Your Site First!</strong>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">Seriously, don&#8217;t skip this. Take a full backup of your files and database before using any recovery tools</li>
<li class="whitespace-normal break-words">If something goes wrong, you&#8217;ll thank me later</li>
</ul>
</li>
<li class="whitespace-normal break-words"><strong>No Warranty</strong>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">This tool is provided as-is, without any warranty</li>
<li class="whitespace-normal break-words">While I use it regularly on production sites, your mileage may vary</li>
<li class="whitespace-normal break-words">Test it on a staging environment first if possible</li>
</ul>
</li>
<li class="whitespace-normal break-words"><strong>Security Considerations</strong>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">Don&#8217;t leave this file on your server after you&#8217;re done</li>
<li class="whitespace-normal break-words">Always make sure the file has random suffix (wp-recovery-tools-c60f10ea67c4db3d.php)</li>
<li class="whitespace-normal break-words">Keep the renamed filename secret &#8211; it&#8217;s your emergency access key</li>
</ul>
</li>
</ol>
<h2 class="font-600 text-xl font-bold">When to Use This Tool</h2>
<p class="whitespace-pre-wrap break-words">This toolkit is perfect for when:</p>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">You&#8217;re locked out of wp-admin</li>
<li class="whitespace-normal break-words">A plugin or theme update broke your site</li>
<li class="whitespace-normal break-words">You need to quickly add an admin user</li>
<li class="whitespace-normal break-words">WordPress recovery mode isn&#8217;t working</li>
<li class="whitespace-normal break-words">You need to deactivate a problematic plugin</li>
<li class="whitespace-normal break-words">Database needs quick repairs</li>
<li class="whitespace-normal break-words">You need system information for debugging</li>
</ul>
<h2 class="font-600 text-xl font-bold">When Not to Use</h2>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">Don&#8217;t use it for regular WordPress maintenance</li>
<li class="whitespace-normal break-words">Don&#8217;t leave it on your server permanently</li>
<li class="whitespace-normal break-words">Not meant for regular user management</li>
<li class="whitespace-normal break-words">Don&#8217;t use it if WordPress is working normally</li>
</ul>
<h2 class="font-600 text-xl font-bold">Pro Tips</h2>
<ol class="-mt-1 [li&gt;&amp;]:mt-2 list-decimal space-y-2 pl-8">
<li class="whitespace-normal break-words">Keep a copy in your emergency toolkit</li>
<li class="whitespace-normal break-words">Test it on a development site first to get familiar with the features</li>
<li class="whitespace-normal break-words">Document the filename you choose &#8211; you don&#8217;t want to forget it during an emergency</li>
<li class="whitespace-normal break-words">Consider creating a separate backup admin user while everything is working</li>
<li class="whitespace-normal break-words">Bookmark this article for future reference</li>
</ol>
<h2 class="font-600 text-xl font-bold">Technical Requirements</h2>
<ul class="-mt-1 [li&gt;&amp;]:mt-2 list-disc space-y-2 pl-8">
<li class="whitespace-normal break-words">WordPress 5.2 or higher</li>
<li class="whitespace-normal break-words">PHP 7.0 or higher</li>
<li class="whitespace-normal break-words">MySQL/MariaDB</li>
<li class="whitespace-normal break-words">File access to your WordPress root directory</li>
</ul>
<h2 class="font-600 text-xl font-bold">Final Thoughts</h2>
<p class="whitespace-pre-wrap break-words">As someone who manages multiple WordPress sites, having this tool in my arsenal has saved me countless hours of troubleshooting and recovery work. Just remember &#8211; with great power comes great responsibility. Use it wisely, keep it secure, and always, ALWAYS have backups!</p>
<p class="whitespace-pre-wrap break-words">Happy recovering!</p>
<hr />
<p class="whitespace-pre-wrap break-words"><em>P.S. I&#8217;m actively maintaining this tool and adding new features. If you have suggestions or run into any issues, feel free to reach out!</em></p>
<p class="whitespace-pre-wrap break-words"><em>Disclaimer: This tool is provided as-is without any warranties or guarantees. Always backup your site before using any recovery tools.</em></p>
]]></content:encoded>
					
					<wfw:commentRss>https://deepcorelabs.com/wp-recovery-tools-enter-recovery-mode-without-email/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Automatically Install WordPress and Create Database on Plesk</title>
		<link>https://deepcorelabs.com/automatically-install-wordpress-and-create-database-on-plesk/</link>
					<comments>https://deepcorelabs.com/automatically-install-wordpress-and-create-database-on-plesk/#respond</comments>
		
		<dc:creator><![CDATA[Miro Hristov]]></dc:creator>
		<pubDate>Wed, 21 Oct 2015 18:05:46 +0000</pubDate>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">http://deepcorelabs.com/?p=175</guid>

					<description><![CDATA[Overview This code was inspired, well, by laziness. It automatically creates a MySql database and User using the provided information; Downloads the latest version of WP and unzips it; Changes your...]]></description>
										<content:encoded><![CDATA[<h2>Overview</h2>
<p>This code was inspired, well, by laziness.</p>
<p>It automatically creates a MySql database and User using the provided information; Downloads the latest version of WP and unzips it; Changes your config-wp.php to work with the newly created database. Uses SSH2 to connect to shell.</p>
<p>Feel free to use it as is or modify it to your needs. Please report bugs and fixes.</p>
<p>Tested on Plesk 12.0.18.</p>
<h2>Requirements</h2>
<ol>
<li>Odin (former Parallels) Plesk</li>
<li>Root access</li>
<li>PHP 5+</li>
</ol>
<a class="nectar-button n-sc-button small accent-color regular-button" target="_blank" href="https://deepcorelabs.com/wp-content/uploads/2015/10/autowp.zip" data-color-override="false" data-hover-color-override="false" data-hover-text-color-override="#fff"><span>Download ZIP</span></a>
<pre class="lang:php decode:true ">&lt;?php

///////////////////////
// CONFIG
///////////////////////

$rootuser = "root";     // the root user
$rootpass = "PASSWORD"; // the root password
$domainspath = "/var/www/vhosts"; //path to all your domains

///////////////////////
///////////////////////

$db_name = $_REQUEST['db'];
$domain = $_REQUEST['domain'];
$dir = $_REQUEST['dir'];
$user = $_REQUEST['user'];
$pass = $_REQUEST['pass'];
$del = $_REQUEST['del'];
?&gt;

&lt;style&gt;
body {
font-family:sans-serif;
margin:1em;
font-size:1.2em;
color:grey
}

input {
font-size:1.2em;
padding:.3em;
border-radius:4px;
border:1px solid #DEDEDE
}

label {
margin-top:1em
}

input[type='text'] {
width:600px
}

label,input {
display:block
}

.small {
font-size:.5em;
text-transform:uppercase
}

input[type='submit'] {
padding:.5em 1em;
margin:1em 0;
background:#7c3
}

input[type='checkbox'] {
display:inline;
width:.8em;
height:.8em
}
&lt;/style&gt;

&lt;h1&gt;Install WordPress &amp;amp; Create Database&lt;/h1&gt;
&lt;form id="doit" method="post"&gt;
  &lt;label&gt;
    Create Database
    &lt;input id="db" name="db" type="text" /&gt;
  &lt;/label&gt;
  &lt;label&gt;
    Domain
    &lt;input id="domain" name="domain" type="text" /&gt;
  &lt;/label&gt;
  &lt;label&gt;
    Directory
    &lt;input id="dir" name="dir" type="text" /&gt;
  &lt;/label&gt;
  &lt;label&gt;
    Username
    &lt;input id="user" name="user" type="text" /&gt;
  &lt;/label&gt;
  &lt;label&gt;
    Password
    &lt;input id="pass" name="pass" type="text" /&gt;
    &lt;span class="small"&gt;(Must not contain username)&lt;/span&gt;
  &lt;/label&gt;
  &lt;label&gt;
    Delete folder contents? &lt;input type="checkbox" name="del" value="Yes" /&gt;
  &lt;/label&gt;
  &lt;input type="submit" value="Install WP"&gt;
&lt;/form&gt;

&lt;?php

echo "&lt;pre&gt;";

if(empty($domain)){ die("API usage syntax example: ?db=mydb&amp;domain=domain.com&amp;dir=projects/company&amp;user=user&amp;pass=pass"); }
 

//////////////////////////////
// Connect to SSH
//////////////////////////////

//Incude SSH2 phpseclib to use shell commands
set_include_path(get_include_path() . 'SSH2' . PATH_SEPARATOR . 'phpseclib');
include('SSH2/Net/SSH2.php');
$ssh = new Net_SSH2('localhost');
if (!$ssh-&gt;login($rootuser, $rootpass)) {
    exit('SSH2 Login Failed');
}


/////////////////////////////
// CREATE USER
/////////////////////////////
echo $ssh-&gt;exec("/usr/sbin/useradd -g psacln -d /var/www/vhosts/".$domain."/httpdocs/".$dir." ".$user);
//CHMOD to User
echo $ssh-&gt;exec("chown -R ".$user.":psacln /var/www/vhosts/".$domain."/httpdocs/".$dir); 
//echo $ssh-&gt;exec("chown -R apache:psaserv /var/www/vhosts/".$domain."/httpdocs/".$dir); //CHMOD to Apache
echo $ssh-&gt;exec("chmod 775 /var/www/vhosts/".$domain."/httpdocs/".$dir);

/////////////////////////////
// Change Password
/////////////////////////////

$ssh-&gt;write("passwd ".$user."\n");
echo $ssh-&gt;read('New UNIX password:');
$ssh-&gt;write($pass."\n");
echo $ssh-&gt;read('Retype new UNIX password:');
$ssh-&gt;write($pass."\n");
echo $ssh-&gt;read('passwd: all authentication tokens updated successfully.');

echo "&lt;p&gt;===== End Create User =====&lt;/p&gt;";

//////////////////////////
// Plesk DB Create
//////////////////////////

echo $ssh-&gt;exec('cd '.$domainspath);

echo $ssh-&gt;exec('/usr/local/psa/bin/database --create '.$db_name.' -domain '.$domain.' -print-id -server localhost -type mysql');
echo $ssh-&gt;exec('/usr/local/psa/bin/database --update '.$db_name.' -add_user '.$user.' -passwd '.$pass);
echo "&lt;p&gt;===== End DB Create =====&lt;/p&gt;";
echo die();

////////////////////////////////////
// Download and Untar wordpress
////////////////////////////////////
$c = 'cd '.$domainspath.'/'.$domain.'/httpdocs/;';

if(!empty($dir)){
    $c .= 'mkdir -p '.$dir.';'
    .'cd '.$dir.';';
}

if(isset($del) &amp;&amp; $del == 'Yes'){
    $c .='rm * -r;';  //DELETES EVEYTHING INSIDE 
}

$c .='wget --no-check-certificate https://www.wordpress.org/latest.tar.gz;'
    .'tar xfvz latest.tar.gz;'
    .'mv wordpress/* .;'
    .'rmdir wordpress;'
    .'rm latest.tar.gz;'
    .'cp wp-config-sample.php wp-config.php;'
    .'perl -pi -e "s/database_name_here/'.$db_name.'/g" wp-config.php;'
    .'perl -pi -e "s/username_here/'.$user.'/g" wp-config.php;'
    .'perl -pi -e "s/password_here/'.$pass.'/g" wp-config.php;'
    .'mkdir wp-content/uploads;'
    .'chmod 777 wp-content/uploads;';


$pc = str_replace(';', ';&lt;br&gt;', $c);
echo '&lt;br&gt;$ '.$pc;
echo $ssh-&gt;exec($c);

echo "&lt;p&gt;===== End WP download &amp; wp-config =====&lt;/p&gt;";
?&gt;
&lt;/pre&gt;</pre>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://deepcorelabs.com/automatically-install-wordpress-and-create-database-on-plesk/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
