./ipswap.sh Old_IP New_IP
for example:
./ipswap.sh 35.224.2.88 104.197.113.37
Innovation Technology
./ipswap.sh Old_IP New_IP
for example:
./ipswap.sh 35.224.2.88 104.197.113.37
-- Disable foreign key checks (important for InnoDB)
SET
FOREIGN_KEY_CHECKS = 0;
-- Delete product meta
DELETE
pm
FROM
wp_postmeta pm
JOIN wp_posts p ON
pm.post_id = p.ID
WHERE
p.post_type = 'product' AND p.post_status != 'draft';
-- Delete term relationships
DELETE
tr
FROM
wp_term_relationships tr
JOIN wp_posts p ON
tr.object_id = p.ID
WHERE
p.post_type = 'product' AND p.post_status != 'draft';
-- Delete the products
DELETE
FROM
wp_posts
WHERE
post_type = 'product' AND post_status != 'draft';
-- Enable foreign key checks again
SET
FOREIGN_KEY_CHECKS = 1;
Steps:
Apply your filter in Sheet1.
Select the range where you want to paste the formula (e.g., A2:A100
) but only visible cells will be selected.
Select the range.
Press F5
or Ctrl+G
→ Click Special… → Choose Visible cells only → OK.
Type your formula (e.g.):
=INDEX(Sheet2!A:A, ROW()-1)
Press Ctrl+Enter
(instead of just Enter).
Resetting the Password via SSH:
passwd <username>
(replace <username>
with your DirectAdmin username, often admin
or your server username). service directadmin restart
. Sub save_pdf_and_attach_in_email()
Dim OutApp As Object
Dim OutMail As Object
Dim ws As Worksheet
Dim pdf_range As Range
Dim pdf_path As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Set ws = ThisWorkbook.Sheets("Sheet 1")
Set pdf_range = ws.Range("A1:C11")
pdf_path = "C:\Users\greggowaffles\Documents\Youtube Videos\Test\Stats\" & _
"Population Data.pdf"
'align range in pdf
ws.PageSetup.CenterHorizontally = True
pdf_range.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=pdf_path, OpenAfterPublish:=False
'create email
On Error Resume Next
With OutMail
.to = "team@abc.com"
.CC = ""
.BCC = ""
.Subject = "Country Population Data " & Format(Date, "mm-dd-yyyy")
.Display
.HTMLBody = "<BODY style = 'font-size:12pt; font-family:Calibri'>" & _
"Hi Team,<p>Please see attached pdf file.<p>Thanks,<br>Greg" & .HTMLBody
.Attachments.Add pdf_path
End With
On Error GoTo 0
Set OutApp = Nothing
Set OutMail = Nothing
'Kill pdf_path
End Sub
./ipswap.sh Old_IP New_IP for example: ./ipswap.sh 35.224.2.88 104.197.113.37