My query relates to a WordPress website, which is hosted on a VPS.
Earlier today, I needed to upload my backed up Database. Upon completion, I was returned with the message:
SQL query:
ALTER TABLE 'wp_options'
ADD PRIMARY KEY ('option_id)
ADD UNIQUE KEY 'option_name' ('option_name')
MySQL said:
#1062 - Duplicate entry '0' for key 'PRIMARY'
The website seems to have fully uploaded, with all of its content, however (and I am not sure if this is connected) when I edit a page and select 'Update', it does not seem to save the modifications.
I am hoping that by resolving the database issue, the other issue will look after itself.
If anyone could provide me with a straight forward fix, it would be much appreciated.
Thanks.
Craig
wp_options:select option_name, count(option_name) from wp_options o1 where (select count(1) from wp_options o2 where o1.option_name = o2.option_name) > 1 group by option_name;and add that to your question? We should look to see what items are duplicates. And do the same foroption_idtoo.