Wget Wordpress
Topics
- Detailed Instructions
- Step 2: Create the Database and a User
- Step 4: Upload the files
- Step 5: Run the Install Script
WordPress is well-known for its ease of installation. Under most circumstances, installing WordPress is a very simple process and takes less than five minutes to complete. Many web hosts now offer tools (e.g. Fantastico) to automatically install WordPress for you. However, if you wish to install WordPress yourself, the following guide will help.
Things to Know Before Installing WordPress Things to Know Before Installing WordPress
How to Install and Setup WordPress on Linux. WordPress is one of the best content management systems (CMS) available. If you do not wish to go through the complicated process of setting up a website from scratch, WordPress will be your best choice. The mere fact that a blogger is using some standard WordPress widgets in the sidebar (like the monthly archive or a tag cloud) helps bots tremendously. Setting up wget on Windows. While the subculture that uses wget daily is heavily weighted towards Unix, using wget on Windows is a bit more unusual. Create a wp-config.php file by copying the sample file WordPress has provided.
Before you begin the install, there are a few things you need to have and do. Refer the article Before You Install.
If you need multiple WordPress instances, refer Installing Multiple WordPress Instances.
Basic InstructionsBasic Instructions
Here’s the quick version of the instructions for those who are already comfortable with performing such installations. More detailed instructions follow.
- Download and unzip the WordPress package if you haven’t already.
- Create a database for WordPress on your web server, as well as a MySQL (or MariaDB) user who has all privileges for accessing and modifying it.
- (Optional) Find and rename wp-config-sample.php to wp-config.php, then edit the file (see Editing wp-config.php) and add your database information.
Note: If you are not comfortable with renaming files, step 3 is optional and you can skip it as the install program will create the wp-config.php file for you. - Upload the WordPress files to the desired location on your web server:
- If you want to integrate WordPress into the root of your domain (e.g. http://example.com/), move or upload all contents of the unzipped WordPress directory (excluding the WordPress directory itself) into the root directory of your web server.
- If you want to have your WordPress installation in its own subdirectory on your website (e.g. http://example.com/blog/), create the blog directory on your server and upload the contents of the unzipped WordPress package to the directory via FTP.
- Note: If your FTP client has an option to convert file names to lower case, make sure it’s disabled.
- Run the WordPress installation script by accessing the URL in a web browser. This should be the URL where you uploaded the WordPress files.
- If you installed WordPress in the root directory, you should visit: http://example.com/
- If you installed WordPress in its own subdirectory called blog, for example, you should visit: http://example.com/blog/
That’s it! WordPress should now be installed.
Detailed InstructionsDetailed Instructions
Step 1: Download and ExtractStep 1: Download and Extract
Download and unzip the WordPress package from https://wordpress.org/download/.
- If you will be uploading WordPress to a remote web server, download the WordPress package to your computer with a web browser and unzip the package.
- If you will be using FTP, skip to the next step – uploading files is covered later.
- If you have shell access to your web server, and are comfortable using console-based tools, you may wish to download WordPress directly to your web server using wget (or lynx or another console-based web browser) if you want to avoid FTPing:
- wget https://wordpress.org/latest.tar.gz
- Then unzip the package using:
tar -xzvf latest.tar.gzThe WordPress package will extract into a folder called wordpress in the same directory that you downloadedlatest.tar.gz.
Step 2: Create the Database and a UserStep 2: Create the Database and a User
If you are using a hosting provider, you may already have a WordPress database set up for you, or there may be an automated setup solution to do so. Check your hosting provider’s support pages or your control panel for clues about whether or not you’ll need to create one manually.
If you determine that you’ll need to create one manually, follow the instructions for Using phpMyAdmin below to create your WordPress username and database. For other tools such as Plesk, cPanel and Using the MySQL Client, refer the article Creating Database for WordPress.
If you have only one database and it is already in use, you can install WordPress in it – just make sure to have a distinctive prefix for your tables to avoid over-writing any existing database tables.
Using phpMyAdminUsing phpMyAdmin
If your web server has phpMyAdmin installed, you may follow these instructions to create your WordPress username and database. If you work on your own computer, on most Linux distributions you can install PhpMyAdmin automatically.
Note: These instructions are written for phpMyAdmin 4.4; the phpMyAdmin user interface can vary slightly between versions.
- If a database relating to WordPress does not already exist in the Database dropdown on the left, create one:
- Choose a name for your WordPress database: ‘wordpress‘ or ‘blog‘ are good, but most hosting services (especially shared hosting) will require a name beginning with your username and an underscore, so, even if you work on your own computer, we advise that you check your hosting service requirements so that you can follow them on your own server and be able to transfer your database without modification. Enter the chosen database name in the Create database field and choose the best collation for your language and encoding. In most cases it’s better to choose in the “utf8_” series and, if you don’t find your language, to choose “utf8mb4_general_ci” (Refer this article).
- Choose a name for your WordPress database: ‘wordpress‘ or ‘blog‘ are good, but most hosting services (especially shared hosting) will require a name beginning with your username and an underscore, so, even if you work on your own computer, we advise that you check your hosting service requirements so that you can follow them on your own server and be able to transfer your database without modification. Enter the chosen database name in the Create database field and choose the best collation for your language and encoding. In most cases it’s better to choose in the “utf8_” series and, if you don’t find your language, to choose “utf8mb4_general_ci” (Refer this article).
- Click the phpMyAdmin icon in the upper left to return to the main page, then click the Users tab. If a user relating to WordPress does not already exist in the list of users, create one:
- Click Add user.
- Choose a username for WordPress (‘wordpress‘ is good) and enter it in the User name field. (Be sure Use text field: is selected from the dropdown.)
- Choose a secure password (ideally containing a combination of upper- and lower-case letters, numbers, and symbols), and enter it in the Password field. (Be sure Use text field: is selected from the dropdown.) Re-enter the password in the Re-typefield.
- Write down the username and password you chose.
- Leave all options under Global privileges at their defaults.
- Click Go.
- # Return to the Users screen and click the Edit privileges icon on the user you’ve just created for WordPress.
- # In the Database-specific privileges section, select the database you’ve just created for WordPress under the Add privileges to the following database dropdown, and click Go.
- # The page will refresh with privileges for that database. Click Check All to select all privileges, and click Go.
- # On the resulting page, make note of the host name listed after Server: at the top of the page. (This will usually be localhost.)
Step 3: Set up wp-config.phpStep 3: Set up wp-config.php
You can either create and edit the wp-config.php file yourself, or you can skip this step and let WordPress try to do this itself when you run the installation script (step 5). (you’ll still need to tell WordPress your database information).
(For more extensive details, and step by step instructions for creating the configuration file and your secret key for password security, please see Editing wp-config.php.)
Return to where you extracted the WordPress package in Step 1, rename the file wp-config-sample.php to wp-config.php, and open it in a text editor.
Enter your database information under the section labeled
- DB_NAME
- The name of the database you created for WordPress in Step 2.
- DB_USER
- The username you created for WordPress in Step 2.
- DB_PASSWORD
- The password you chose for the WordPress username in Step 2.
- DB_HOST
- The hostname you determined in Step 2 (usually localhost, but not always; see some possible DB_HOST values). If a port, socket, or pipe is necessary, append a colon (:) and then the relevant information to the hostname.
- DB_CHARSET
- The database character set, normally should not be changed (see Editing wp-config.php).
- DB_COLLATE
- The database collation should normally be left blank (see Editing wp-config.php).
Enter your secret key values under the section labeled
Save the wp-config.php file.
Step 4: Upload the filesStep 4: Upload the files
Now you will need to decide where on your domain you’d like your WordPress-powered site to appear:
- In the root directory of your website. (For example, http://example.com/)
- In a subdirectory of your website. (For example, http://example.com/blog/)
Note: The location of your root web directory in the filesystem on your web server will vary across hosting providers and operating systems. Check with your hosting provider or system administrator if you do not know where this is.
In the Root DirectoryIn the Root Directory
- If you need to upload your files to your web server, use an FTP client to upload all the contents of the wordpress directory (but not the directory itself) into the root directory of your website.
- If your files are already on your web server, and you are using shell access to install WordPress, move all of the contents of the wordpress directory (but not the directory itself) into the root directory of your website.
In a SubdirectoryIn a Subdirectory
- If you need to upload your files to your web server, rename the wordpress directory to your desired name, then use an FTP client to upload the directory to your desired location within the root directory of your website.
- If your files are already on your web server, and you are using shell access to install WordPress, move the wordpress directory to your desired location within the root directory of your website, and rename the directory to your desired name.
Step 5: Run the Install ScriptStep 5: Run the Install Script
Point a web browser to start the installation script.
- If you placed the WordPress files in the root directory, you should visit: http://example.com/wp-admin/install.php
- If you placed the WordPress files in a subdirectory called blog, for example, you should visit: http://example.com/blog/wp-admin/install.php
Setup configuration fileSetup configuration file
If WordPress can’t find the wp-config.php file, it will tell you and offer to try to create and edit the file itself. (You can also do this directly by loading wp-admin/setup-config.php in your web browser.) WordPress will ask you the database details and write them to a new wp-config.php file. If this works, you can go ahead with the installation; otherwise, go back and create, edit, and upload the wp-config.php file yourself (step 3).
Finishing installationFinishing installation
The following screenshots show how the installation progresses. Notice that in entering the details screen, you enter your site title, your desired user name, your choice of a password (twice), and your e-mail address. Also displayed is a check-box asking if you would like your blog to appear in search engines like Google and DuckDuckGo. Leave the box unchecked if you would like your blog to be visible to everyone, including search engines, and check the box if you want to block search engines, but allow normal visitors. Note all this information can be changed later in your Administration Screen.
If you successfully install the WordPress, login prompt will be displayed.
Install script troubleshootingInstall script troubleshooting
- If you get an error about the database when you run the install script:
- Go back to Step 2 and Step 3, and make sure you entered all the correct database information into wp-config.php.
- Make sure you granted your WordPress user permission to access your WordPress database in Step 3.
- Make sure the database server is running.
Common Installation ProblemsCommon Installation Problems
The following are some of the most common installation problems. For more information and troubleshooting for problems with your WordPress installation, check out FAQ Installation and FAQ Troubleshooting.
I see a directory listing rather than a web page.
The web server needs to be told to view index.php by default. In Apache, use the DirectoryIndex index.php directive. The simplest option is to create a file named .htaccess in the installed directory and place the directive there. Another option is to add the directive to the web server’s configuration files.
I see lots of Headers already sent errors. How do I fix this?
You probably introduced a syntax error in editing wp-config.php.
- Download wp-config.php (if you don’t have shell access).
- Open it in a text editor.
- Check that the first line contains nothing but <?php, and that there is no text before it (not even whitespace).
- Check that the last line contains nothing but ?>, and that there is no text after it (not even whitespace).
- If your text editor saves as Unicode, make sure it adds no byte order mark (BOM). Most Unicode-enabled text editors do not inform the user whether or not it adds a BOM to files; if so, try using a different text editor.
- Save the file, upload it again if necessary, and reload the page in your browser.
My page comes out gibberish. When I look at the source I see a lot of “<?php ?>” tags.
If the <?php ?> tags are being sent to the browser, it means your PHP is not working properly. All PHP code is supposed to be executed before the server sends the resulting HTML to your web browser. (That’s why it’s called a preprocessor.) Make sure your web server meets the requirements to run WordPress, that PHP is installed and configured properly, or contact your hosting provider or system administrator for assistance.
I keep getting an Error connecting to database message but I’m sure my configuration is correct.
Try resetting your MySQL password manually. If you have access to MySQL via shell, try issuing:
If you do not have shell access, you should be able to simply enter the above into an SQL query in phpMyAdmin. Failing that, you may need to use your host’s control panel to reset the password for your database user.
I keep getting an Your PHP installation appears to be missing the MySQL extension which is required by WordPress message but I’m sure my configuration is correct.
Check to make sure that your configuration of your web-server is correct and that the MySQL plugin is getting loaded correctly by your web-server program. Sometimes this issue requires everything in the path all the way from the web-server down to the MySQL installation to be checked and verified to be fully operational. Incorrect configuration files or settings are often the cause of this issue.
My image/MP3 uploads aren’t working.
If you use the Rich Text Editor on a blog that’s installed in a subdirectory, and drag a newly uploaded image into the editor field, the image may vanish a couple seconds later. This is due to a problem with TinyMCE (the rich text editor) not getting enough information during the drag operation to construct the path to the image or other file correctly. The solution is to NOT drag uploaded images into the editor. Instead, click and hold on the image and select Send to Editor.
We’ll show you, how to install and use wget on Ubuntu. Wget is a free software package that can be used for retrieving files using HTTP, HTTPS and FTP which are considered as the most widely-used Internet protocols. Its name comes from World Wide Web + get. Installing wget on Ubuntu is easy task, just carefully follow our tutorial below.wget has many features to make retrieving large files or mirroring entire web or FTP sites easy, including:
- Can resume aborted downloads, using REST and RANGE;
- Can use filename wild cards and recursively mirror directories;
- NLS-based message files for many different languages;
- Optionally converts absolute links in downloaded documents to relative, so that downloaded documents may link to each other locally;
- Runs on most UNIX-like operating systems as well as Microsoft Windows;
- Supports HTTP proxies;
- Supports HTTP cookies;
- Supports persistent HTTP connections;
- Unattended / background operation;
- Uses local file timestamps to determine whether documents need to be re-downloaded when mirroring;
- GNU Wget is distributed under the GNU General Public License.
wget is non-interactive which gives great flexibility in using it. It can be easily called from scripts, cron jobs, terminals etc. It can work in the background even if a user is not logged in.
In this article, we will install wget on an Ubuntu 16.04 VPS and provide some useful wget example commands. Please note that even though tested on Ubuntu 16.04, the instructions can be used on any other Ubuntu version.
REQUIREMENTS
We will be using our SSD 1 VPS hosting plan running Ubuntu 16.04
1. LOG IN TO YOUR SERVER VIA SSH
You can check whether you have the proper Ubuntu version installed on your server with the following command:
You should get this output:
2. UPDATE THE SYSTEM
Make sure your server is fully up to date using:
3. INSTALL AND USE WGET
Once the upgrades are done, install wget using:
We can now start using wget.
I will now download the latest WordPress version using wget:
The output from this command will include a download status bar which will tell you how far the download has come and what is the download speed.
wget by default picks the filename according to the last word after the forward slash. Sometimes this can be an issue as some downloads will have a clumsy name. To avoid this, you can save the file into a value of your choice. Let’s modify the WordPress download command a little bit:
Now the downloaded file will be named wordpress.zip and not latest.zip as the default use of wget would have named it.
You can even specify the download speed. For example:
I had cases when I downloaded big files and due to a temporarily lost connection, the download was interrupted. But have no fear, because the -c flag is here. Using -c in the command will continue with the download from where it stopped. Example:
This is why it is recommended to put the download in the background when the file is big. This can be done using -b:
Sometimes the servers that the files are being downloaded from can be busy and slow. So using wget in it’s most natural form is not recommended. You can set up a number of retries for wget to download the file.
You can also download multiple files using one command. First, let’s open a file. Call it download.txt:
Now using a text editor of your choice enter the download URL’s in the file. We are using nano:
We are closing and saving the file. Let’s see what we entered:
Now use the below command to download all the files from the download.txt file:
Very useful, right?
You can also find out the date when a web page have been modified last:
We mentioned in the introduction of this article that wget can download recursively. This way you can download a whole directory. Example:
Once, I had to migrate a Magento website, but only had FTP access to the account and believe me, migrating over FTP can be slow. So I had to use wget to download the data. You are probably wondering how? Well, this is what I did:
- Created an archive file that contains the Magento files/directories;
- Moved that file into the website document root;
- Used wget to download the file.
I reckon that you already know how I downloaded the file, but here goes that magic command that saved me from a slow migration:
What Wordpress Theme Is A Site Using
Since Magento data can be big, you can use some of the above options (flags) to put wget in the background or continue from where the download was interrupted.
While we are talking about FTP, you can also use wget to perform an FTP download:
Or download using the FTP username and password:
As you can see, wget is a very useful tool for everyday Linux administration. You can find more info about wget and it’s options from the wget man page.
Hopefully, you now have a clearer view on what wget can do for you.
What Wordpress Theme Does A Website Use
Of course, if you use one of our VPS Hosting services, all you have to do is ask our expert Linux admins to installblog/how-to-speed-up-magento/or offer some advice on how to use it. They are available 24×7 and will take care of your request immediately. If this post helped you, you may also like our post on How to Install and Use Wget on Linux.
How To Download Wordpress Classic
PS. If you liked this post on how to install and use wget on Ubuntu, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.