Report this

What is the reason for this report?

Migration of wordpress files to LEMP server, I cant find my pages, and images but themes and plugins are present

Posted on May 25, 2016

I just installed Wordpress to a LEMP server and imported my archived database into the the new database

I have also transferred my wpcontent folder which I unzipped into my wordpress folder using sudo unzip wp-content.zip -d /var/www/html

My problem is that my theme files and plugins all imported successfully but I cannot see my pages , posts or media files on my website, even though I can see the images in the uploads folder when im viewing my wordpress folder via Winscp

How can I have a complete migration of my website



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Pages posts and the location of uploaded images are all managed by the database so it sounds like you ran into an issue either with that import or with your wordpress configuration.

Since you aren’t seeing any DB connection errors my first guess is that there is a difference in the table prefix setting. Take a look at your database and make sure that the table prefix (or lack of one) is reflected in your wp-config.php file

$table_prefix = ‘wp_’;

Also, make sure that your connection settings in wp-config.php are set correctly.

@ryanpq I had to recreate my droplet to find the issue, I think it has to do with the database file I am importing

I tried to replicate my website on my notebook using xampp and it worked perfectly when i imported a zipped version of the database(.sql.gz)

Now when i try to import the zipped version into digitalocean using the command

"mysql -h localhost -u database_user -p database_name < backup_db.sql.gz "

I get this error

“ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?” ’ at line 1

I went back to import the unzipped version(.sql) and it worked, my theme folders and plugins were uploaded but I cannot find my posts or pages or media files

Please how can I troubleshoot this?, as I have searched Google for a solution without success

Heya,

You can ensure that your database import was successful and that all tables are present. Also you can re-import the database tables to check if this makes any difference.

Few other things you can do is to check the wp_prefix in the wp-config.php file and also check the files ownership and permissions.

sudo find /var/www/html -type d -exec chmod 755 {} \; 
sudo find /var/www/html -type f -exec chmod 644 {} \;

You can also examine the PHP and Nginx error log files to see if there is a more detailed information.

Regards

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.