[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]
by Arooj Ahmed via Digital Information World
"Mr Branding" is a blog based on RSS for everything related to website branding and website design, it collects its posts from many sites in order to facilitate the updating to the latest technology.
To suggest any source, please contact me: Taha.baba@consultant.com
Do you want to wipe the slate clean and start your WordPress website from scratch?
Maybe your site has seriously lost its way, and you’d prefer to delete all of your content rather than manually unpicking every single one of your mistakes. Perhaps you want to cut ties with your old site and relaunch it as something entirely new. Or, maybe you were using your account to experiment with various WordPress themes and plugins, and now you’re finally ready to get serious about building your website.
Why go to the effort of deleting WordPress and then reinstalling it from scratch, when you can just hit the reset button?
In this article, I’ll share two ways that you can roll back time and restore WordPress to its fresh-out-of-the-box state, without having to go to the trouble of deleting and reinstalling WordPress.
If you do want to install WordPress from scratch, you can learn how in our complete guide.
When you reset your WordPress website, you restore all of its files and databases to their original state.
There’s countless reasons why you might want to reset WordPress, but some common ones include:
Restoring WordPress to its default settings is a big step that should never be taken lightly.
Before factory resetting your site, you should consider whether there’s a less drastic solution that can deliver the results you want, without requiring you to delete all of your website’s content.
When you created your WordPress account, you were asked to choose a domain name.
If you’re still using your original domain, then there’s a chance it may no longer accurately reflect your website. It’s also possible that your site has grown into something much bigger than originally anticipated, and you’re starting to worry that your light-hearted, jokey domain name is preventing people from taking you seriously.
While you could migrate all of your content to a new website and then reset your original site, this is a complex, multi-step process that will damage your website’s Search Engine Optimization (SEO) and performance.
Instead of migrating your content, you should register a new domain, then replace all instances of your old domain with the new domain name. Then, you just need to setup a few 301 redirects, and visitors will be automatically redirected to your shiny new domain.
Not only is this process far easier than a full-blown migration and WordPress reset, it also helps preserve your website’s SEO, ensuring that your site continues to rank high in Google’s all-important search results.
Sometimes, you may want to delete all of your website’s pages and posts, for example if you’re relaunching your blog. While resetting your WordPress will get rid of this content, it’ll also delete any other customizations you’ve made to your website, including any changes you’ve made to your WordPress settings.
Instead of resetting WordPress, you can delete all of your pages and/or posts, with just a few clicks:
All of the selected content will now be deleted.
Even if you want to completely overhaul every part of your website, you don’t necessarily have to delete everything and start from scratch! Often, you can completely change your website's look and feel by simply switching to a new theme.
If you want to test out various themes without giving your visitors whiplash, then the free Theme Switcha plugin lets you experiment with themes while displaying your current theme to anyone who's viewing your website.
So, you’ve considered the alternatives and decided to go ahead and reset your WordPress website, but before hitting that reset button it’s recommended that you create a backup.
Resetting your website may seem like the perfect solution now, but there’s always a chance you may need some of your old content further down the line. If you reset your website without creating a backup, then all of this content will be lost forever.
You can quickly and easily download a copy of all your posts, pages, comments, categories, and tags, using WordPress’ built-in Export tool. The Export tool generates an XML file that contains all of this content, plus references to your website’s image files. These references will only be functional if they link to an image that’s publicly available online, for example an image that’s hosted on another website. As a general rule you should expect to lose all of your images when you reset your website, so now’s the time to download any images that you want to hang onto.
Before exporting your content, it’s a good idea to spring-clean your website as this will help ensure a smooth, error-free import, if you ever need to restore your previous content. In particular, it’s recommended that you delete any comments that are marked as spam, and approve any pending comments, in order to ensure the exported XML file is as clean as possible.
When you’re ready to export your content:
Select Download Export File.
All of your content will now be downloaded as an XML file.
If you want to restore this content at any point, then you just need to import the XML file into your WordPress website:
WordPress will now reinstate all of your old content.
The easiest way to reset your WordPress website is to use a plugin.
There are plenty of free plugins that provide reset functionality, but in this tutorial I’ll be using the Advanced WordPress Reset plugin, which restores your WordPress database to its original state, deleting all of your content and customizations in the process.
Advanced WordPress Reset will not delete any of your themes or plugins, but it will deactivate them, so you’ll still get that fresh-out-of-the-box experience. At the time of writing, Advanced WordPress Reset does not support Multisite.
Although installing a plugin simply to reset your WordPress website may seem like overkill, resetting WordPress manually is a multi-step process, so this plugin can save you a tonne of time—and potentially spare you a few headaches!
To reset your website using the Advanced WordPress Reset plugin:
Read the onscreen warning. This plugin will reset your entire website—if you haven’t exported your website then this is your last chance to back out before losing this content forever. If you still want to proceed, then type reset into the text field.
To delete all of your website’s content and customizations, click Reset database.
Once the reset is complete, you’ll be prompted to log into your admin account, and your WordPress website will be ready to go!
Most of the time, it makes sense to reset your website using a plugin—it’s quicker, easier and there’s less chance of things going horribly wrong! However, even if you do use a plugin, it can still be helpful to understand what that plugin is doing behind-the-scenes, just in case you encounter any issues when resetting your website.
The process of resetting WordPress manually will vary depending on your hosting provider, how your website is configured, and the tools you use to manage your site, but as a general rule you’ll need a File Transfer Protocol (FTP) client, and a hosting admin tool such as phpMyAdmin or cPanel.
In this final section, I’ll outline the steps you’ll typically take, in order to reset your website manually.
First, you’ll need to delete your website’s MySQL database, which will permanently remove all of your site’s settings and content.
You can delete this database using your hosting admin tool, for example if you’re using cPanel then you’ll find all of your databases by navigating to Databases > MySQL Databases. Once you’ve identified your WordPress database, make a note of its name and then go ahead and hit Delete.
Your WordPress website cannot load without a database, so once you’ve deleted your old database, you’ll need to create a new one.
If you’re using cPanel, then:
If your username doesn’t appear in the User dropdown, then you can recreate your account in the Add a New User section. Wherever possible, you should re-use your previous database username and password.
If you cannot remember your login details, then you can retrieve your username and password using your favourite FTP client:
You can now use this information to create a new database user.
While we have our FTP client open, this is the perfect opportunity to delete any plugins or themes that you no longer use:
The wp-content folder should contain plugins and themes folders. You can open each of these folders and delete the items that you want to remove, or you can remove all plugins by deleting the plugins folder itself.
At this point, your WordPress website is completely clean, but it isn’t quite ready to use.
To turn this blank slate into a functional website, you’ll need to run the WordPress installation script:
The installation script will now run, and your WordPress website will be ready for you to use!
In this article, I showed you how to turn back the clock and restore your WordPress website to its original state, using either a plugin or by deleting your WordPress database manually.
Now you’ve got a fresh copy of WordPress, you’re ready to start building your website! For advice on how to create an attention-grabbing, high-performing website that visitors will love, check out some of our other WordPress tutorials.
Explore thousands of the best WordPress themes ever created on ThemeForest and leading WordPress plugins on CodeCanyon. Purchase these high-quality WordPress themes and plugins and improve your website experience for you and your visitors.
Here are a few of the best-selling and up-and-coming WordPress themes and plugins available for 2020.
Today, I’m going to show you how to install PHP in the Ubuntu OS. First, I'll show you how to install the default stable version of PHP and then I'll show you how you can install other versions of PHP.
PHP is a server-side scripting language which is mostly used to build web applications—these may range from a very simple blog website to a full-fledged eCommerce store. In fact, PHP is one of the most popular server-side scripting languages for web development.
Learn PHP for Free
If you want to learn PHP, check out our free online course on PHP fundamentals!
In this course, you'll learn the fundamentals of PHP programming. You'll start with the basics, learning how PHP works and writing simple PHP loops and functions. Then you'll build up to coding classes for simple object-oriented programming (OOP). Along the way, you'll learn all the most important skills for writing apps for the web: you'll get a chance to practice responding to GET and POST requests, parsing JSON, authenticating users, and using a MySQL database.
In the next section, we’ll go through prerequisites that are required in order to install PHP in your Ubuntu installation.
Before we go ahead and install PHP, let’s make sure of the following things in the first place.
It’s assumed that you know how to use the Linux terminal to run commands. In fact, basic knowledge of the Linux shell is enough, you don’t have to be an expert!
To install software packages, either you need to have root access or you need to have a user with sudo access. Throughout the course of this tutorial, I’m going to use the root user to install PHP and other necessary packages. Of course, there’s nothing stopping you from using a user with sudo rights instead.
Generally speaking, the process of installing PHP remains the same in different versions of Ubuntu. Unless you specify, the install
command will try to find the default stable version of PHP for your Ubuntu installation and install that. but, if you want to install a specific version of PHP, you may need to add related packages. In the latter half of the article, we’ll go through an example to demonstrate how you could install the PHP 7.4 version.
In the first half of the article, we’ll see how you could install the default stable version of PHP in Ubuntu. Next, we’ll discuss how to install the PHP 7.4 version in Ubuntu. In fact, PHP has several different versions and if you want to install some other version of PHP, drop me a line in the comments section and I’ll be happy to help.
With that out of our way, we’re ready to move on to the next section!
In this section, we’ll go through the necessary steps in order to install PHP. Specifically, we’ll install the latest stable version of PHP which is supported for the Ubuntu installation available on your system.
For *nix-based systems—Linux and Unix—it’s always preferred to update the list of available packages before we install or upgrade any software. It makes sure that we get the latest version of the software. So it’s recommended to run apt-get update
and apt-get upgrade
commands.
Thus, before we go ahead and install PHP, let’s run the following commands in your terminal.
$apt-get update && apt-get upgrade
The apt-get update
command should update the list of available packages along with their versions. On the other hand, the apt-get upgrade
command actually installs and updates necessary packages.
After running the above commands successfully, we’re ready to move on to the next section.
When it comes to installing PHP, it takes only a single command: apt-get install php
. In fact, if you want to make sure which packages will be installed before actually installing it, you can add the --dry-run
option along with the command.
Firstly, let’s do a dry run instead of actually installing anything.
$sudo apt-get install --dry-run php Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: php7.2 The following NEW packages will be installed: php php7.2 0 upgraded, 2 newly installed, 0 to remove and 230 not upgraded. Inst php7.2 (7.2.24-0ubuntu0.18.04.4 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [all]) Inst php (1:7.2+60ubuntu1 Ubuntu:18.04/bionic [all]) Conf php7.2 (7.2.24-0ubuntu0.18.04.4 Ubuntu:18.04/bionic-updates, Ubuntu:18.04/bionic-security [all]) Conf php (1:7.2+60ubuntu1 Ubuntu:18.04/bionic [all])
As you can see, this displays a complete list of packages that will be installed, upgraded and removed. In fact, I recommend you to do a dry run before installing any software, as it provides useful information.
Finally, let’s go ahead and install PHP:
$sudo apt-get install php
And with that, apt-get
should install PHP and other necessary packages in your system. Let’s quickly verify the PHP version which is just installed with the following command:
$php -v PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.24-0ubuntu0.18.04.3, Copyright (c) 1999-2018, by Zend Technologies
As you can see, this displays the PHP version along with other useful information. You should see similar output if PHP is installed successfully.
In the next section, I'll show you how to install PHP extensions.
In the previous section, we installed PHP, but you might also need to install PHP extensions separately.
You can use the following command to list out all the PHP extensions.
$apt-cache search --names-only ^php
And if you are looking for extensions that are specifically supported for the PHP 7.2 version, you can use the following command.
$apt-cache search --names-only ^php | grep "php7.2"
Once you’ve a list of PHP extensions that you want to install, you just need to use the apt-get install
command to install them. For example, the following command installs the php7.2-odbc
extension.
$apt-get install php7.2-odbc
This installs the php-odbc
extension and upgrades any necessary packages along with it.
In the next section, we’ll discuss how you could install a specific version of PHP.
In this section, we’ll go through how you could install PHP 7.4 in Ubuntu, which is the latest stable version of PHP.
As we discussed in the previous section, let’s run the following commands to update and upgrade the list of available packages.
$apt-get update && apt-get upgrade
Next, we’ll need to add the ondrej/php
repository, which is a PPA repository and it contains the latest build packages of PHP.
Go ahead and run the following commands that add the ppa:ondrej/php
repository and update the list of available packages along with their versions.
$apt -y install software-properties-common $add-apt-repository ppa:ondrej/php $apt-get update
And with that, we’re ready to install PHP 7.4.
Finally, let’s use the following command to install PHP 7.4.
$apt -y install php7.4
After running the above command successfully, you could check the PHP version with the php -v
command.
After installing PHP 7.4, if you want to install additional extensions, you could search it using the following command.
$apt-cache search --names-only ^php | grep "php7.4"
And finally, run the apt-get install
command to install extensions that you want to install.
Sometimes you need to manage multiple versions of PHP on the same Ubuntu server. For example, your old projects might still be running on PHP 5.x and they might not yet be upgradable to PHP 7.x. On the other hand, if you’re working on a new project you might want the latest stable version of PHP 7.x. In this scenario, you have to install two different versions of PHP on your server.
There are different ways you could use to configure the specific version of PHP to be used with Apache for Nginx web servers. Or you could also use the update-alternatives
command to set the default version of PHP which will be used if you’ve multiple versions of PHP.
Let’s assume that you’ve installed two different versions of PHP: PHP 7.2 and PHP 7.4. If you want to set the PHP 7.4 version to be the default version, you could run the following command.
$update-alternatives --set php /usr/bin/php7.4
In this way, you can switch between different versions of PHP for development purposes.
In this article, we went through the necessary steps that are required to install PHP in the Ubuntu OS. Along with that, I also took an opportunity to show how to install the specific version of PHP as well.
For complete applications that you can use and customize, take a look the professional PHP scripts on CodeCanyon.
Explore thousands of the best and most useful PHP scripts ever created on CodeCanyon.
Here are a few of the best-selling and up-and-coming PHP scripts available on CodeCanyon for 2020.