WordPress

WordPress tips & tricks

There are some tips and tricks when working with WordPress

Save your WP files and database

Some times your need to download your WordPress files and your database

Save your WordPress files

To to your webhosting and login. Find File Manager and go inside the folder.
Here is an overview of all your files in the different domains

Export your database

If you need to export your database. You must go to you database site (simply and one.com do it differently)
Here you choose export > fast > SQL

WP

Move WordPress

We have talked about, how you can work with WordPress online, but what if you have made one on your localhost and want to move it?

FTP client

Set up your FTP client and connect to your web hosting accont. Find the folder you want you WordPress to be in.

Find your WP folder

Find you WordPress folder with all the WordPress files. Copy them and insert them in your FTP folder

Create a database

You now have the files, but you are missing a database. There you must download the local database from phpMyAdmin and upload it online on your webshosting. Instead of export chosse import

Change the site URL

Now the files are uploaded and the databse is ploaded, but the URLs are not. To do that, go to your database and find {prefix}_options (The prefix can be differnt. It depends on what you wrote when making the database).
Under options_name you need to look for siteurl. Click Edit.
Under the option_value you will see the URL of your local install. Here you can insert your new site URL in this field. Remember to click Go
Now you need to reapt it for the option home, the URL here should be the same as the siteurl

Setup live server

We now have the database and the files, but now you will get a Error Establishing Database Connection error.
To fix tgat go to your FTP client and edit wp-config.php Here you need to change the database name, user and password, to the same you used ealier. Save the file and it should be live now.
go to Setting > Generel and without chaing anything scrool to the bottom and click save Changes. Do the same under Settings > Permalink

Broken images and links

If you get any broken links and missing images, you can update them in the database with this code or use Velvet Blues WordPress Plugin

UPDATE wp_posts SET post_content = REPLACE(post_content, 'localhost/test/', 'www.yourlivesite.com/');